diff --git a/modules/libpr0n/test/reftest/generic/check-header.sjs b/modules/libpr0n/test/reftest/generic/check-header.sjs index a5e9964fd97..ceefbbe65f2 100644 --- a/modules/libpr0n/test/reftest/generic/check-header.sjs +++ b/modules/libpr0n/test/reftest/generic/check-header.sjs @@ -50,8 +50,8 @@ const IMAGE_DATA = function handleRequest(request, response) { - response.setHeader("Content-Type", "text/plain"); - response.setHeader("Cache-Control", "no-cache"); + response.setHeader("Content-Type", "text/plain", false); + response.setHeader("Cache-Control", "no-cache", false); var accept = request.hasHeader("Accept") ? request.getHeader("Accept") diff --git a/netwerk/test/httpserver/test/test_basic_functionality.js b/netwerk/test/httpserver/test/test_basic_functionality.js index e6b95d738f7..8cb8afac86b 100644 --- a/netwerk/test/httpserver/test/test_basic_functionality.js +++ b/netwerk/test/httpserver/test/test_basic_functionality.js @@ -190,7 +190,7 @@ var objHandler = function functionHandler(metadata, response) { response.setStatusLine("1.1", 404, "Page Not Found"); - response.setHeader("foopy", "quux-baz"); + response.setHeader("foopy", "quux-baz", false); do_check_eq(metadata.port, 4444); do_check_eq(metadata.host, "localhost"); diff --git a/netwerk/test/httpserver/test/test_headers.js b/netwerk/test/httpserver/test/test_headers.js index 167f47a8bc5..f2299da4a80 100644 --- a/netwerk/test/httpserver/test/test_headers.js +++ b/netwerk/test/httpserver/test/test_headers.js @@ -200,12 +200,12 @@ function testHasHeader() { var headers = new nsHttpHeaders(); - headers.setHeader("foo", "bar"); + headers.setHeader("foo", "bar", false); do_check_true(headers.hasHeader("foo")); do_check_true(headers.hasHeader("fOo")); do_check_false(headers.hasHeader("not-there")); - headers.setHeader("f`'~", "bar"); + headers.setHeader("f`'~", "bar", false); do_check_true(headers.hasHeader("F`'~")); try diff --git a/netwerk/test/httpserver/test/test_registerdirectory.js b/netwerk/test/httpserver/test/test_registerdirectory.js index cba23cc9ca7..dd99f5a3cff 100644 --- a/netwerk/test/httpserver/test/test_registerdirectory.js +++ b/netwerk/test/httpserver/test/test_registerdirectory.js @@ -300,7 +300,7 @@ function run_test() function override_test_registerdirectory(metadata, response) { response.setStatusLine("1.1", 200, "OK"); - response.setHeader("Override-Succeeded", "yes"); + response.setHeader("Override-Succeeded", "yes", false); var body = "success!"; response.bodyOutputStream.write(body, body.length); diff --git a/netwerk/test/unit/test_authentication.js b/netwerk/test/unit/test_authentication.js index 759517e058c..5eb1b999694 100644 --- a/netwerk/test/unit/test_authentication.js +++ b/netwerk/test/unit/test_authentication.js @@ -424,7 +424,7 @@ function authHandler(metadata, response) { // /auth/ntlm/simple function authNtlmSimple(metadata, response) { response.setStatusLine(metadata.httpVersion, 401, "Unauthorized"); - response.setHeader("WWW-Authenticate", "NTLM" /* + ' realm="secret"' */); + response.setHeader("WWW-Authenticate", "NTLM" /* + ' realm="secret"' */, false); var body = "NOTE: This just sends an NTLM challenge, it never\n" + "accepts the authentication. It also closes\n" + diff --git a/netwerk/test/unit/test_plaintext_sniff.js b/netwerk/test/unit/test_plaintext_sniff.js index c705cc317a3..56dfc50ef99 100644 --- a/netwerk/test/unit/test_plaintext_sniff.js +++ b/netwerk/test/unit/test_plaintext_sniff.js @@ -154,7 +154,7 @@ function doTest(headerIdx, bodyIdx) { } function createResponse(headerIdx, bodyIdx, metadata, response) { - response.setHeader("Content-Type", contentTypeHeaderList[headerIdx][0]); + response.setHeader("Content-Type", contentTypeHeaderList[headerIdx][0], false); response.bodyOutputStream.write(bodyList[bodyIdx][0], bodyList[bodyIdx][0].length); } diff --git a/netwerk/test/unit/test_resumable_channel.js b/netwerk/test/unit/test_resumable_channel.js index 4d43f8c2241..9446b924597 100644 --- a/netwerk/test/unit/test_resumable_channel.js +++ b/netwerk/test/unit/test_resumable_channel.js @@ -258,13 +258,13 @@ function rangeHandler(metadata, response) { var to = (matches[2] === undefined) ? rangeBody.length - 1 : matches[2]; if (from >= rangeBody.length) { response.setStatusLine(metadata.httpVersion, 416, "Start pos too high"); - response.setHeader("Content-Range", "*/" + rangeBody.length); + response.setHeader("Content-Range", "*/" + rangeBody.length, false); return; } body = body.substring(from, to + 1); // always respond to successful range requests with 206 response.setStatusLine(metadata.httpVersion, 206, "Partial Content"); - response.setHeader("Content-Range", from + "-" + to + "/" + rangeBody.length); + response.setHeader("Content-Range", from + "-" + to + "/" + rangeBody.length, false); } response.bodyOutputStream.write(body, body.length); @@ -274,7 +274,7 @@ function rangeHandler(metadata, response) { function redirHandler(metadata, response) { response.setStatusLine(metadata.httpVersion, 302, "Found"); response.setHeader("Content-Type", "text/html", false); - response.setHeader("Location", metadata.getHeader("X-Redir-To")); + response.setHeader("Location", metadata.getHeader("X-Redir-To"), false); var body = "redirect\r\n"; response.bodyOutputStream.write(body, body.length); } diff --git a/testing/mochitest/server.js b/testing/mochitest/server.js index 54cf4ef928a..b335320b2a2 100644 --- a/testing/mochitest/server.js +++ b/testing/mochitest/server.js @@ -191,7 +191,7 @@ function runServer() function serverShutdown(metadata, response) { response.setStatusLine("1.1", 200, "OK"); - response.setHeader("Content-type", "text/plain"); + response.setHeader("Content-type", "text/plain", false); var body = "Server shut down."; response.bodyOutputStream.write(body, body.length); @@ -203,7 +203,7 @@ function serverShutdown(metadata, response) function redirect(metadata, response) { response.setStatusLine("1.1", 301, "Moved Permanently"); - response.setHeader("Location", metadata.queryString); + response.setHeader("Location", metadata.queryString, false); } // @@ -475,7 +475,7 @@ function testListing(metadata, response) function defaultDirHandler(metadata, response) { response.setStatusLine("1.1", 200, "OK"); - response.setHeader("Content-type", "text/html"); + response.setHeader("Content-type", "text/html", false); try { if (metadata.path.indexOf("/tests") != 0) { regularListing(metadata, response); diff --git a/toolkit/components/downloads/test/unit/test_resume.js b/toolkit/components/downloads/test/unit/test_resume.js index 09a8ca0470e..6b9a51202d7 100644 --- a/toolkit/components/downloads/test/unit/test_resume.js +++ b/toolkit/components/downloads/test/unit/test_resume.js @@ -76,13 +76,13 @@ function run_test() var to = (matches[2] === undefined) ? data.length - 1 : matches[2]; if (from >= data.length) { resp.setStatusLine(meta.httpVersion, 416, "Start pos too high"); - resp.setHeader("Content-Range", "*/" + data.length); + resp.setHeader("Content-Range", "*/" + data.length, false); return; } body = body.substring(from, to + 1); // always respond to successful range requests with 206 resp.setStatusLine(meta.httpVersion, 206, "Partial Content"); - resp.setHeader("Content-Range", from + "-" + to + "/" + data.length); + resp.setHeader("Content-Range", from + "-" + to + "/" + data.length, false); } resp.bodyOutputStream.write(body, body.length); });