Title: [222203] trunk/Source/WebDriver
- Revision
- 222203
- Author
- [email protected]
- Date
- 2017-09-18 23:40:01 -0700 (Mon, 18 Sep 2017)
Log Message
WebDriver: HTTP responses should include Cache-Control header with no-cache value
https://bugs.webkit.org/show_bug.cgi?id=177073
Reviewed by Sergio Villar Senin.
6.3 Processing Model.
Set the response’s header with name and value with the following values:
Content-Type "application/json; charset=utf-8"
Cache-Control "no-cache"
https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-a-response
We were setting the Content-Type, but not the Cache-Control. This is checked by all WPT WebDriver tests.
* soup/HTTPServerSoup.cpp:
(WebDriver::HTTPServer::listen): Add Cache-Control header.
Modified Paths
Diff
Modified: trunk/Source/WebDriver/ChangeLog (222202 => 222203)
--- trunk/Source/WebDriver/ChangeLog 2017-09-19 06:35:27 UTC (rev 222202)
+++ trunk/Source/WebDriver/ChangeLog 2017-09-19 06:40:01 UTC (rev 222203)
@@ -1,3 +1,23 @@
+2017-09-18 Carlos Garcia Campos <[email protected]>
+
+ WebDriver: HTTP responses should include Cache-Control header with no-cache value
+ https://bugs.webkit.org/show_bug.cgi?id=177073
+
+ Reviewed by Sergio Villar Senin.
+
+ 6.3 Processing Model.
+ Set the response’s header with name and value with the following values:
+
+ Content-Type "application/json; charset=utf-8"
+ Cache-Control "no-cache"
+
+ https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-a-response
+
+ We were setting the Content-Type, but not the Cache-Control. This is checked by all WPT WebDriver tests.
+
+ * soup/HTTPServerSoup.cpp:
+ (WebDriver::HTTPServer::listen): Add Cache-Control header.
+
2017-09-18 Michael Catanzaro <[email protected]>
[CMake] Rename WebKit target to WebKitLegacy and rename WebKit2 target to WebKit
Modified: trunk/Source/WebDriver/soup/HTTPServerSoup.cpp (222202 => 222203)
--- trunk/Source/WebDriver/soup/HTTPServerSoup.cpp 2017-09-19 06:35:27 UTC (rev 222202)
+++ trunk/Source/WebDriver/soup/HTTPServerSoup.cpp 2017-09-19 06:40:01 UTC (rev 222203)
@@ -49,7 +49,10 @@
[server, message = WTFMove(protectedMessage)](HTTPRequestHandler::Response&& response) {
soup_message_set_status(message.get(), response.statusCode);
if (!response.data.isNull()) {
+ // §6.3 Processing Model.
+ // https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-a-response
soup_message_headers_append(message->response_headers, "Content-Type", response.contentType.utf8().data());
+ soup_message_headers_append(message->response_headers, "Cache-Control", "no-cache");
soup_message_body_append(message->response_body, SOUP_MEMORY_COPY, response.data.data(), response.data.length());
}
soup_server_unpause_message(server, message.get());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes