Bug 1154426 - Ignore gzip problems if only soft-enforcing. r=mcmanus, a=lizzard
authorDaniel Stenberg <daniel@haxx.se>
Wed, 22 Apr 2015 17:13:57 -0700
changeset 265802 10fb1d23ac56c10091f94d3f95b4050e53d1ef20
parent 265801 6ab4d0b260199c846ee3a5853f32d047a3569186
child 265803 296bda936bd61a6071e411988f388098bc720ba5
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, lizzard
bugs1154426
milestone39.0a2
Bug 1154426 - Ignore gzip problems if only soft-enforcing. r=mcmanus, a=lizzard
netwerk/streamconv/converters/nsHTTPCompressConv.cpp
netwerk/test/unit/test_content_length_underrun.js
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
@@ -35,18 +35,17 @@ nsHTTPCompressConv::nsHTTPCompressConv()
     , mStreamInitialized(false)
     , mLen(0)
     , hMode(0)
     , mSkipCount(0)
     , mFlags(0)
 {
     if (NS_IsMainThread()) {
         mFailUncleanStops =
-            (Preferences::GetBool("network.http.enforce-framing.soft", false) ||
-             Preferences::GetBool("network.http.enforce-framing.http", false));
+            Preferences::GetBool("network.http.enforce-framing.http", false);
     } else {
         mFailUncleanStops = false;
     }
 }
 
 nsHTTPCompressConv::~nsHTTPCompressConv()
 {
     NS_IF_RELEASE(mListener);
--- a/netwerk/test/unit/test_content_length_underrun.js
+++ b/netwerk/test/unit/test_content_length_underrun.js
@@ -213,16 +213,18 @@ function handler4(metadata, response)
   response.write("\r\n");
   response.write(body);
   response.finish();
 }
 
 function completeTest4(request, data, ctx)
 {
   do_check_eq(request.status, Components.results.NS_OK);
+
+  prefs.setBoolPref("network.http.enforce-framing.http1", true);
   run_gzip_test(99);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Test 99: FAIL because a cut off gzip stream CAN be detected
 
 // Note that test 99 here is run completely different than the other tests in
 // this file so if you add more tests here, consider adding them before this.