mirror of
https://github.com/Radarr/Radarr
synced 2024-12-27 02:09:59 +00:00
Fixed: Not uploading nzbs to Nzbget on linux since previous develop.
This commit is contained in:
parent
22aa759abc
commit
eb70a6419c
2 changed files with 8 additions and 1 deletions
|
@ -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 a new issue