Bug 1596251 - Fix exception in WPT service-workers/cache-storage/resources/vary.py r=jgraham
authorValentin Gosu <valentin.gosu@gmail.com>
Mon, 18 Nov 2019 10:09:25 +0000
changeset 502450 82ba763a36a7940c8980a2f7262a97defb074399
parent 502449 b42230b2ad6e97d7399a608d5297348a1906a754
child 502451 100092ccffcdcdeea743bad5bc80c7696fba1844
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1596251
milestone72.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 1596251 - Fix exception in WPT service-workers/cache-storage/resources/vary.py r=jgraham This exception is unlikely to be the cause of the leak in bug 1596251, but I came across it while investigating. Differential Revision: https://phabricator.services.mozilla.com/D53358
testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-add.https.html.ini
testing/web-platform/meta/service-workers/cache-storage/window/cache-add.https.html.ini
testing/web-platform/meta/service-workers/cache-storage/worker/cache-add.https.html.ini
testing/web-platform/tests/service-workers/cache-storage/resources/vary.py
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/cache-storage/serviceworker/cache-add.https.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[cache-add.https.html]
-  [Cache.addAll should reject when one entry has a vary header matching another entry]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/cache-storage/window/cache-add.https.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[cache-add.https.html]
-  [Cache.addAll should reject when one entry has a vary header matching another entry]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/service-workers/cache-storage/worker/cache-add.https.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[cache-add.https.html]
-  [Cache.addAll should reject when one entry has a vary header matching another entry]
-    expected: FAIL
-
--- a/testing/web-platform/tests/service-workers/cache-storage/resources/vary.py
+++ b/testing/web-platform/tests/service-workers/cache-storage/resources/vary.py
@@ -1,8 +1,10 @@
+from six import text_type
+
 def main(request, response):
   if "clear-vary-value-override-cookie" in request.GET:
     response.unset_cookie("vary-value-override")
     return "vary cookie cleared"
 
   set_cookie_vary = request.GET.first("set-vary-value-override-cookie",
                                       default="")
   if set_cookie_vary:
@@ -10,16 +12,16 @@ def main(request, response):
     return "vary cookie set"
 
   # If there is a vary-value-override cookie set, then use its value
   # for the VARY header no matter what the query string is set to.  This
   # override is necessary to test the case when two URLs are identical
   # (including query), but differ by VARY header.
   cookie_vary = request.cookies.get("vary-value-override");
   if cookie_vary:
-    response.headers.set("vary", cookie_vary)
+    response.headers.set("vary", text_type(cookie_vary))
   else:
     # If there is no cookie, then use the query string value, if present.
     query_vary = request.GET.first("vary", default="")
     if query_vary:
       response.headers.set("vary", query_vary)
 
   return "vary response"