Bug 643291 - chnage nshttpcompressconv NS_ERROR to NS_WARNING for data input error r=honzab
authorPatrick McManus <mcmanus@ducksong.com>
Wed, 23 Mar 2011 11:01:34 -0400
changeset 63769 264508dc959b733a66a9e45d04f0642cef039a8c
parent 63768 dbe8ef0649acaf30b92e9f757b76396f4b12e74a
child 63770 118451f8ec760dbd24f669a4542c04b2c2878f4f
push idunknown
push userunknown
push dateunknown
reviewershonzab
bugs643291
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 643291 - chnage nshttpcompressconv NS_ERROR to NS_WARNING for data input error r=honzab
netwerk/streamconv/converters/nsHTTPCompressConv.cpp
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
@@ -259,17 +259,18 @@ nsHTTPCompressConv::OnDataAvailable(nsIR
                         d_stream.avail_in = sizeof(dummy_head);
 
                         code = inflate(&d_stream, Z_NO_FLUSH);
                         if (code != Z_OK)
                             return NS_ERROR_FAILURE;
 
                         // stop an endless loop caused by non-deflate data being labelled as deflate
                         if (mDummyStreamInitialised) {
-                            NS_ERROR("endless loop detected");
+                            NS_WARNING("endless loop detected"
+                                       " - invalid deflate");
                             return NS_ERROR_INVALID_CONTENT_ENCODING;
                         }
                         mDummyStreamInitialised = PR_TRUE;
                         // reset stream pointers to our original data
                         d_stream.next_in = mInpBuffer;
                         d_stream.avail_in = (uInt)streamLen;
                     }    
                     else