зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1352146 - fix whitespace in moz-http2.js. r=mcmanus
MozReview-Commit-ID: Ij4c6RS0UyV --HG-- extra : rebase_source : 72a7b30b76f627765bcb11b9ea9b1e3f9246aafb
This commit is contained in:
Родитель
498369fdf0
Коммит
7edcb91dff
|
@ -506,9 +506,9 @@ function handleRequest(req, res) {
|
||||||
res.writeHead(400);
|
res.writeHead(400);
|
||||||
res.end("WHAT?");
|
res.end("WHAT?");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// test the alt svc frame for use with altsvc2
|
// test the alt svc frame for use with altsvc2
|
||||||
res.altsvc("foo.example.com", serverPort, "h2", 3600, req.headers['x-redirect-origin']);
|
res.altsvc("foo.example.com", serverPort, "h2", 3600, req.headers['x-redirect-origin']);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (u.pathname === "/altsvc2") {
|
else if (u.pathname === "/altsvc2") {
|
||||||
|
@ -729,20 +729,20 @@ function handleRequest(req, res) {
|
||||||
|
|
||||||
// for use with test_immutable.js
|
// for use with test_immutable.js
|
||||||
else if (u.pathname === "/immutable-test-without-attribute") {
|
else if (u.pathname === "/immutable-test-without-attribute") {
|
||||||
res.setHeader('Cache-Control', 'max-age=100000');
|
res.setHeader('Cache-Control', 'max-age=100000');
|
||||||
res.setHeader('Etag', '1');
|
res.setHeader('Etag', '1');
|
||||||
if (req.headers["if-none-match"]) {
|
if (req.headers["if-none-match"]) {
|
||||||
res.setHeader("x-conditional", "true");
|
res.setHeader("x-conditional", "true");
|
||||||
}
|
}
|
||||||
// default response from here
|
// default response from here
|
||||||
}
|
}
|
||||||
else if (u.pathname === "/immutable-test-with-attribute") {
|
else if (u.pathname === "/immutable-test-with-attribute") {
|
||||||
res.setHeader('Cache-Control', 'max-age=100000, immutable');
|
res.setHeader('Cache-Control', 'max-age=100000, immutable');
|
||||||
res.setHeader('Etag', '2');
|
res.setHeader('Etag', '2');
|
||||||
if (req.headers["if-none-match"]) {
|
if (req.headers["if-none-match"]) {
|
||||||
res.setHeader("x-conditional", "true");
|
res.setHeader("x-conditional", "true");
|
||||||
}
|
}
|
||||||
// default response from here
|
// default response from here
|
||||||
}
|
}
|
||||||
else if (u.pathname === "/origin-4") {
|
else if (u.pathname === "/origin-4") {
|
||||||
var originList = [ ];
|
var originList = [ ];
|
||||||
|
@ -751,7 +751,7 @@ function handleRequest(req, res) {
|
||||||
}
|
}
|
||||||
else if (u.pathname === "/origin-6") {
|
else if (u.pathname === "/origin-6") {
|
||||||
var originList = [ "https://alt1.example.com:" + serverPort,
|
var originList = [ "https://alt1.example.com:" + serverPort,
|
||||||
"https://alt2.example.com:" + serverPort,
|
"https://alt2.example.com:" + serverPort,
|
||||||
"https://bar.example.com:" + serverPort ];
|
"https://bar.example.com:" + serverPort ];
|
||||||
req.stream.connection.originFrame(originList);
|
req.stream.connection.originFrame(originList);
|
||||||
res.setHeader("x-client-port", req.remotePort);
|
res.setHeader("x-client-port", req.remotePort);
|
||||||
|
@ -794,7 +794,7 @@ function handleRequest(req, res) {
|
||||||
'content-length' : 1
|
'content-length' : 1
|
||||||
});
|
});
|
||||||
pushe.end('1');
|
pushe.end('1');
|
||||||
}
|
}
|
||||||
else if (u.pathname.substring(0,8) === "/origin-") { // test_origin.js coalescing
|
else if (u.pathname.substring(0,8) === "/origin-") { // test_origin.js coalescing
|
||||||
res.setHeader("x-client-port", req.remotePort);
|
res.setHeader("x-client-port", req.remotePort);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче