Title: [249945] trunk
- Revision
- 249945
- Author
- [email protected]
- Date
- 2019-09-17 00:39:52 -0700 (Tue, 17 Sep 2019)
Log Message
Content-Type should be preserved on responses created from DOMCache
https://bugs.webkit.org/show_bug.cgi?id=201815
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
Fixes one subtest.
Remaining failing test is failing consistently in other browsers.
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt:
Source/WebCore:
Covered by updated test expectations
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::create):
Update content type when creating the response from DOMCache.
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (249944 => 249945)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-09-17 07:26:17 UTC (rev 249944)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-09-17 07:39:52 UTC (rev 249945)
@@ -1,3 +1,17 @@
+2019-09-17 Youenn Fablet <[email protected]>
+
+ Content-Type should be preserved on responses created from DOMCache
+ https://bugs.webkit.org/show_bug.cgi?id=201815
+
+ Reviewed by Alex Christensen.
+
+ Fixes one subtest.
+ Remaining failing test is failing consistently in other browsers.
+
+ * web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt:
+ * web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt:
+ * web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt:
+
2019-09-16 Alex Christensen <[email protected]>
Remove "gopher" from list of special schemes in URLParser
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt (249944 => 249945)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt 2019-09-17 07:26:17 UTC (rev 249944)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt 2019-09-17 07:39:52 UTC (rev 249945)
@@ -22,6 +22,6 @@
PASS Cache.match with a network error Response
PASS Cache produces large Responses that can be cloned and read correctly.
FAIL cors-exposed header should be stored correctly. assert_equals: expected (string) "bar" but got (object) null
-FAIL MIME type should be set from content-header correctly. assert_equals: network and cache response mime types should match expected "text/html" but got ""
-FAIL MIME type should be frozen at response construction. assert_equals: original and cached overwritten response mime types should match expected "text/html" but got ""
+PASS MIME type should be set from content-header correctly.
+FAIL MIME type should be frozen at response construction. assert_equals: original and cached overwritten response mime types should match expected "text/html" but got "text/plain"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt (249944 => 249945)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt 2019-09-17 07:26:17 UTC (rev 249944)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-match.https-expected.txt 2019-09-17 07:39:52 UTC (rev 249945)
@@ -21,6 +21,6 @@
PASS Cache.match with a network error Response
PASS Cache produces large Responses that can be cloned and read correctly.
FAIL cors-exposed header should be stored correctly. assert_equals: expected (string) "bar" but got (object) null
-FAIL MIME type should be set from content-header correctly. assert_equals: network and cache response mime types should match expected "text/html" but got ""
-FAIL MIME type should be frozen at response construction. assert_equals: original and cached overwritten response mime types should match expected "text/html" but got ""
+PASS MIME type should be set from content-header correctly.
+FAIL MIME type should be frozen at response construction. assert_equals: original and cached overwritten response mime types should match expected "text/html" but got "text/plain"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt (249944 => 249945)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt 2019-09-17 07:26:17 UTC (rev 249944)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/worker/cache-match.https-expected.txt 2019-09-17 07:39:52 UTC (rev 249945)
@@ -21,6 +21,6 @@
PASS Cache.match with a network error Response
PASS Cache produces large Responses that can be cloned and read correctly.
FAIL cors-exposed header should be stored correctly. assert_equals: expected (string) "bar" but got (object) null
-FAIL MIME type should be set from content-header correctly. assert_equals: network and cache response mime types should match expected "text/html" but got ""
-FAIL MIME type should be frozen at response construction. assert_equals: original and cached overwritten response mime types should match expected "text/html" but got ""
+PASS MIME type should be set from content-header correctly.
+FAIL MIME type should be frozen at response construction. assert_equals: original and cached overwritten response mime types should match expected "text/html" but got "text/plain"
Modified: trunk/Source/WebCore/ChangeLog (249944 => 249945)
--- trunk/Source/WebCore/ChangeLog 2019-09-17 07:26:17 UTC (rev 249944)
+++ trunk/Source/WebCore/ChangeLog 2019-09-17 07:39:52 UTC (rev 249945)
@@ -1,3 +1,16 @@
+2019-09-17 Youenn Fablet <[email protected]>
+
+ Content-Type should be preserved on responses created from DOMCache
+ https://bugs.webkit.org/show_bug.cgi?id=201815
+
+ Reviewed by Alex Christensen.
+
+ Covered by updated test expectations
+
+ * Modules/fetch/FetchResponse.cpp:
+ (WebCore::FetchResponse::create):
+ Update content type when creating the response from DOMCache.
+
2019-09-16 Antti Koivisto <[email protected]>
Move code for traversing reversed text boxes from TextIterator to TextBoxIterator
Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp (249944 => 249945)
--- trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp 2019-09-17 07:26:17 UTC (rev 249944)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp 2019-09-17 07:39:52 UTC (rev 249945)
@@ -54,6 +54,7 @@
auto headers = isOpaque ? FetchHeaders::create(guard) : FetchHeaders::create(guard, HTTPHeaderMap { response.httpHeaderFields() });
auto fetchResponse = adoptRef(*new FetchResponse(context, WTFMove(body), WTFMove(headers), WTFMove(response)));
+ fetchResponse->updateContentType();
if (!isSynthetic)
fetchResponse->m_filteredResponse = ResourceResponseBase::filter(fetchResponse->m_internalResponse);
if (isOpaque)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes