Skip to content

Commit

Permalink
Bug 1544231 - add image/webp to default navigation value of the Accep…
Browse files Browse the repository at this point in the history
…t header, r=mayhemer

Differential Revision: https://phabricator.services.mozilla.com/D51199

--HG--
extra : moz-landing-system : lando
  • Loading branch information
JuniorHsu committed Nov 1, 2019
1 parent 69fb1e3 commit 167a3b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ add_task(async function() {
`${method} ${SIMPLE_URL} ${httpVersion}`,
"Host: example.com",
"User-Agent: " + navigator.userAgent + "",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language: " + navigator.languages.join(",") + ";q=0.5",
"Accept-Encoding: gzip, deflate",
"Connection: keep-alive",
Expand Down
2 changes: 1 addition & 1 deletion netwerk/protocol/http/nsHttpHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"network.tcp.tcp_fastopen_http_stalls_timeout"

#define ACCEPT_HEADER_NAVIGATION \
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
#define ACCEPT_HEADER_IMAGE "image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5"
#define ACCEPT_HEADER_STYLE "text/css,*/*;q=0.1"
#define ACCEPT_HEADER_ALL "*/*"
Expand Down
2 changes: 1 addition & 1 deletion netwerk/test/mochitests/test_accept_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
let ifr = document.createElement("iframe");
ifr.src = "test_accept_header.sjs?iframe";
ifr.onload = () => {
test_last_request_and_continue("iframe", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
test_last_request_and_continue("iframe", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
};
document.body.appendChild(ifr);
}
Expand Down

0 comments on commit 167a3b6

Please sign in to comment.