Fixed: Not uploading nzbs to Nzbget on linux since previous develop.
This commit is contained in:
parent
22aa759abc
commit
eb70a6419c
|
@ -43,7 +43,9 @@ namespace NzbDrone.Common.Http.Dispatchers
|
|||
|
||||
if (request.NetworkCredential != null)
|
||||
{
|
||||
throw new NotImplementedException("Credentials not supported for curl dispatcher.");
|
||||
var authInfo = request.NetworkCredential.UserName + ":" + request.NetworkCredential.Password;
|
||||
authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
|
||||
request.Headers["Authorization"] = "Basic " + authInfo;
|
||||
}
|
||||
|
||||
lock (CurlGlobalHandle.Instance)
|
||||
|
|
|
@ -23,6 +23,11 @@ namespace NzbDrone.Common.Http.Dispatchers
|
|||
webRequest.ContentLength = 0;
|
||||
webRequest.CookieContainer = cookies;
|
||||
|
||||
if (request.NetworkCredential != null)
|
||||
{
|
||||
webRequest.PreAuthenticate = true;
|
||||
}
|
||||
|
||||
if (request.RequestTimeout != TimeSpan.Zero)
|
||||
{
|
||||
webRequest.Timeout = (int)Math.Ceiling(request.RequestTimeout.TotalMilliseconds);
|
||||
|
|
Loading…
Reference in New Issue