Bug 1052856 - Copy as curl should use --compressed instead of -H accept-encoding gzip r=jryans

This commit is contained in:
Raymond Etornam Agbeame(:retornam) 2014-08-29 15:49:01 -07:00
Родитель d97f20d1cc
Коммит d6888a866b
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -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"',

Просмотреть файл

@ -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;
}