summaryrefslogtreecommitdiffstats
path: root/net/spdy
diff options
context:
space:
mode:
authorrtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-13 00:19:02 +0000
committerrtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-13 00:19:02 +0000
commit5c839728e1fb7d9395e61d3db07cbc9820ac2178 (patch)
tree279cc7e8320bab1a75990bfe52c462dd0bdaea06 /net/spdy
parent94c130e13bd7d41b477d150fe85ebd2ef3834ebc (diff)
downloadchromium_src-5c839728e1fb7d9395e61d3db07cbc9820ac2178.zip
chromium_src-5c839728e1fb7d9395e61d3db07cbc9820ac2178.tar.gz
chromium_src-5c839728e1fb7d9395e61d3db07cbc9820ac2178.tar.bz2
Handle Z_BUF_ERROR as a non-fatal error while incrementally decompressing
SYN_STREAM/SYN_REPLY headers. This also fixes bug when server sends SYN_REPLY in separate chunks (i.e. header + zlib chunks ) chrome fails to recognize it. BUG=108596 R=jar TEST=ASAN tests and network unit tests Review URL: http://codereview.chromium.org/9185036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r--net/spdy/spdy_framer.cc2
-rw-r--r--net/spdy/spdy_framer_test.cc4
2 files changed, 2 insertions, 4 deletions
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index 958cb92..aec8637 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -1526,7 +1526,7 @@ bool SpdyFramer::IncrementallyDecompressControlFrameHeaderData(
decomp->next_out = reinterpret_cast<Bytef*>(buffer);
decomp->avail_out = arraysize(buffer);
int rv = DecompressHeaderBlockInZStream(decomp);
- if (rv != Z_OK) {
+ if (rv != Z_OK && rv != Z_BUF_ERROR) {
set_error(SPDY_DECOMPRESS_FAILURE);
DLOG(WARNING) << "inflate failure: " << rv;
processed_successfully = false;
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index 389c90e..21642ad 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -817,9 +817,7 @@ TEST_F(SpdyFramerTest, HeaderCompression) {
}
// Verify we don't leak when we leave streams unclosed
-// http://crbug.com/108596 - Disabled, failed ASAN tests.
-// TODO(rtenneti): investigating why it is failing.
-TEST_F(SpdyFramerTest, DISABLED_UnclosedStreamDataCompressors) {
+TEST_F(SpdyFramerTest, UnclosedStreamDataCompressors) {
SpdyFramer send_framer;
send_framer.set_enable_compression(true);