Bug 1424076 - P2 adjust Origin header comparison for POST request r=Honza
authorJunior Hsu <juhsu@mozilla.com>
Tue, 09 Jul 2019 18:26:59 +0000
changeset 482011 e85a0177b2f7f3a25db03d6c14f0823736e8af43
parent 482010 51140597ddb7fab77bd4b1e06d187749a4fe34c0
child 482012 86406127033aefa2c41b3c47183f0a6c331dcb77
push id113647
push useraciure@mozilla.com
push dateWed, 10 Jul 2019 09:46:39 +0000
treeherdermozilla-inbound@f3a387c13e2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1424076
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1424076 - P2 adjust Origin header comparison for POST request r=Honza We'd like to enable the Origin header for all eligible reqeusts, which include POST. The test should be adjusted. Differential Revision: https://phabricator.services.mozilla.com/D33382
devtools/client/netmonitor/test/browser_net_copy_as_curl.js
--- a/devtools/client/netmonitor/test/browser_net_copy_as_curl.js
+++ b/devtools/client/netmonitor/test/browser_net_copy_as_curl.js
@@ -43,16 +43,17 @@ add_task(async function() {
 
   const COOKIE_PARTIAL_RESULT = [header("Cookie: bob=true; tom=cool")];
 
   const POST_PAYLOAD = "Plaintext value as a payload";
   const POST_PARTIAL_RESULT = [
     "--data " + quote(POST_PAYLOAD),
     header("Content-Type: text/plain;charset=UTF-8"),
   ];
+  const ORIGIN_RESULT = [header("Origin: http://example.com")];
 
   const HEAD_PARTIAL_RESULT = ["-I"];
 
   // GET request, no cookies (first request)
   await performRequest("GET");
   await testClipboardContent([...SIMPLE_BASE, ...BASE_RESULT]);
   // Check to make sure it is still OK after we view the response (bug#1452442)
   await selectIndexAndWaitForSourceEditor(monitor, 0);
@@ -80,16 +81,17 @@ add_task(async function() {
 
   // POST request
   await performRequest("POST", POST_PAYLOAD);
   await testClipboardContent([
     ...SIMPLE_BASE,
     ...BASE_RESULT,
     ...COOKIE_PARTIAL_RESULT,
     ...POST_PARTIAL_RESULT,
+    ...ORIGIN_RESULT,
   ]);
 
   // HEAD request
   await performRequest("HEAD");
   await testClipboardContent([
     ...SIMPLE_BASE,
     ...BASE_RESULT,
     ...COOKIE_PARTIAL_RESULT,