add more device options

This commit is contained in:
Luke Pulverenti
2014-10-11 21:46:02 -04:00
parent f3539686bd
commit 314a51dff3
28 changed files with 162 additions and 82 deletions

View File

@@ -398,7 +398,7 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
options.CancellationToken.ThrowIfCancellationRequested();
return GetResponseInfo(httpResponse, httpResponse.GetResponseStream(), GetContentLength(httpResponse));
return GetResponseInfo(httpResponse, httpResponse.GetResponseStream(), GetContentLength(httpResponse), httpResponse);
}
using (var response = await httpWebRequest.GetResponseAsync().ConfigureAwait(false))
@@ -417,7 +417,7 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
memoryStream.Position = 0;
return GetResponseInfo(httpResponse, memoryStream, memoryStream.Length);
return GetResponseInfo(httpResponse, memoryStream, memoryStream.Length, null);
}
}
}
@@ -480,9 +480,9 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
return exception;
}
private HttpResponseInfo GetResponseInfo(HttpWebResponse httpResponse, Stream content, long? contentLength)
private HttpResponseInfo GetResponseInfo(HttpWebResponse httpResponse, Stream content, long? contentLength, IDisposable disposable)
{
return new HttpResponseInfo
return new HttpResponseInfo(disposable)
{
Content = content,