summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-01-25 17:50:16 -0800
committerAndrew <andrewarnott@gmail.com>2009-01-25 21:14:20 -0800
commit48137c8398e33ad26e4343b4f7df443d8e6bf69c (patch)
tree860c2a952731c85e0249ea4b41b45d095ad7bf4b /src
parent839bd992f796f4e2ad4f06b83061632d86017303 (diff)
downloadDotNetOpenAuth-48137c8398e33ad26e4343b4f7df443d8e6bf69c.zip
DotNetOpenAuth-48137c8398e33ad26e4343b4f7df443d8e6bf69c.tar.gz
DotNetOpenAuth-48137c8398e33ad26e4343b4f7df443d8e6bf69c.tar.bz2
Fixed network stream caching.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/Messaging/CachedDirectWebResponse.cs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/Messaging/CachedDirectWebResponse.cs b/src/DotNetOpenAuth/Messaging/CachedDirectWebResponse.cs
index 0a70a70..530d610 100644
--- a/src/DotNetOpenAuth/Messaging/CachedDirectWebResponse.cs
+++ b/src/DotNetOpenAuth/Messaging/CachedDirectWebResponse.cs
@@ -147,6 +147,7 @@ namespace DotNetOpenAuth.Messaging {
// Now read and cache the network stream
Stream networkStream = response.GetResponseStream();
MemoryStream cachedStream = new MemoryStream(response.ContentLength < 0 ? 4 * 1024 : Math.Min((int)response.ContentLength, maximumBytesToRead));
+ networkStream.CopyTo(cachedStream);
cachedStream.Seek(0, SeekOrigin.Begin);
networkStream.Dispose();