mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Fixed: Not uploading nzbs to Nzbget on linux since previous develop.
This commit is contained in:
parent
22aa759abc
commit
eb70a6419c
@ -43,7 +43,9 @@ public HttpResponse GetResponse(HttpRequest request, CookieContainer cookies)
|
||||
|
||||
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 @@ public HttpResponse GetResponse(HttpRequest request, CookieContainer cookies)
|
||||
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
Block a user