|
|
|
@ -39,6 +39,8 @@ namespace NzbDrone.Common.Http
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public HttpResponse GetResponse(HttpRequest httpRequest, HttpWebRequest webRequest)
|
|
|
|
|
{
|
|
|
|
|
lock (CurlGlobalHandle.Instance)
|
|
|
|
|
{
|
|
|
|
|
Stream responseStream = new MemoryStream();
|
|
|
|
|
Stream headerStream = new MemoryStream();
|
|
|
|
@ -91,6 +93,7 @@ namespace NzbDrone.Common.Http
|
|
|
|
|
|
|
|
|
|
return new HttpResponse(httpRequest, httpHeader, responseData, (HttpStatusCode)curlEasy.ResponseCode);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private CurlSlist SerializeHeaders(HttpWebRequest webRequest)
|
|
|
|
|
{
|
|
|
|
@ -205,6 +208,8 @@ namespace NzbDrone.Common.Http
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Initialize()
|
|
|
|
|
{
|
|
|
|
|
lock (CurlGlobalHandle.Instance)
|
|
|
|
|
{
|
|
|
|
|
if (_initialized)
|
|
|
|
|
return _available;
|
|
|
|
@ -214,6 +219,7 @@ namespace NzbDrone.Common.Http
|
|
|
|
|
|
|
|
|
|
return _available;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override bool ReleaseHandle()
|
|
|
|
|
{
|
|
|
|
|