diff --git a/browser/devtools/netmonitor/test/browser_net_copy_as_curl.js b/browser/devtools/netmonitor/test/browser_net_copy_as_curl.js index 6cff1456f6d4..e67f67326c87 100644 --- a/browser/devtools/netmonitor/test/browser_net_copy_as_curl.js +++ b/browser/devtools/netmonitor/test/browser_net_copy_as_curl.js @@ -16,7 +16,7 @@ function test() { "-H 'User-Agent: " + aDebuggee.navigator.userAgent + "'", "-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'", "-H 'Accept-Language: " + aDebuggee.navigator.language + "'", - "-H 'Accept-Encoding: gzip, deflate'", + "--compressed", "-H 'X-Custom-Header-1: Custom value'", "-H 'X-Custom-Header-2: 8.8.8.8'", "-H 'X-Custom-Header-3: Mon, 3 Mar 2014 11:11:11 GMT'", @@ -31,7 +31,7 @@ function test() { '-H "User-Agent: ' + aDebuggee.navigator.userAgent + '"', '-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"', '-H "Accept-Language: ' + aDebuggee.navigator.language + '"', - '-H "Accept-Encoding: gzip, deflate"', + "--compressed", '-H "X-Custom-Header-1: Custom value"', '-H "X-Custom-Header-2: 8.8.8.8"', '-H "X-Custom-Header-3: Mon, 3 Mar 2014 11:11:11 GMT"', diff --git a/browser/devtools/shared/Curl.jsm b/browser/devtools/shared/Curl.jsm index 615c3fc0662c..dc7fd37fc539 100644 --- a/browser/devtools/shared/Curl.jsm +++ b/browser/devtools/shared/Curl.jsm @@ -120,6 +120,10 @@ this.Curl = { } for (let i = 0; i < headers.length; i++) { let header = headers[i]; + if (header.name === "Accept-Encoding"){ + command.push("--compressed"); + continue; + } if (ignoredHeaders.has(header.name)) { continue; }