summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 18:08:50 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 18:08:50 +0000
commit0b0bf036e2c2722b5d31162ad620b450763fa352 (patch)
treebbeeb3eaaa34df96d3f947d63280a93746837536 /net/base
parent78859c7d87db4433d068533b104c7c1addf7e7eb (diff)
downloadchromium_src-0b0bf036e2c2722b5d31162ad620b450763fa352.zip
chromium_src-0b0bf036e2c2722b5d31162ad620b450763fa352.tar.gz
chromium_src-0b0bf036e2c2722b5d31162ad620b450763fa352.tar.bz2
Reland r59910 - Add HttpResponseBodyDrainer. Use it for unfinished HttpStreams."
There's one simple fix. wtc had asked me to increment the buffer so we keep reading into new memory while draining the body. So I added |total_read_| to |read_buf_|. The problem is |read_buf_| is an IOBuffer*, not a char*, so I'm causing us to read into raw heap memory. Crashes ensue. My unit tests didn't catch it because they never actually read data. I've fixed that by doing a memset(). I've fixed the problem by not bothering to increment the read index, since that would require throwing away IOBuffers or some intrusive modifications to IOBuffer. BUG=54277 TEST=HttpResponseBodyDrainerTest.* Also see the manual testing instructions in r59910. Review URL: http://codereview.chromium.org/3449014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/net_error_list.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/base/net_error_list.h b/net/base/net_error_list.h
index 7f2a6c2..abf18d1 100644
--- a/net/base/net_error_list.h
+++ b/net/base/net_error_list.h
@@ -379,6 +379,9 @@ NET_ERROR(MISCONFIGURED_AUTH_ENVIRONMENT, -343)
// An undocumented SSPI or GSSAPI status code was returned.
NET_ERROR(UNDOCUMENTED_SECURITY_LIBRARY_STATUS, -344)
+// The HTTP response was too big to drain.
+NET_ERROR(RESPONSE_BODY_TOO_BIG_TO_DRAIN, -345)
+
// The cache does not have the requested entry.
NET_ERROR(CACHE_MISS, -400)