Title: [221342] trunk
- Revision
- 221342
- Author
- [email protected]
- Date
- 2017-08-29 21:32:49 -0700 (Tue, 29 Aug 2017)
Log Message
[Fetch API] Request should throw when keep alive is true and body is a ReadableStream
https://bugs.webkit.org/show_bug.cgi?id=176083
Patch by Youenn Fablet <[email protected]> on 2017-08-29
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
* web-platform-tests/fetch/api/request/request-keepalive-expected.txt:
Source/WebCore:
Covered by rebased test.
* Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::setBody):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (221341 => 221342)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-08-30 04:20:45 UTC (rev 221341)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-08-30 04:32:49 UTC (rev 221342)
@@ -1,5 +1,14 @@
2017-08-29 Youenn Fablet <[email protected]>
+ [Fetch API] Request should throw when keep alive is true and body is a ReadableStream
+ https://bugs.webkit.org/show_bug.cgi?id=176083
+
+ Reviewed by Alex Christensen.
+
+ * web-platform-tests/fetch/api/request/request-keepalive-expected.txt:
+
+2017-08-29 Youenn Fablet <[email protected]>
+
Add support for FetchRequest.body
https://bugs.webkit.org/show_bug.cgi?id=176066
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-expected.txt (221341 => 221342)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-expected.txt 2017-08-30 04:20:45 UTC (rev 221341)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-expected.txt 2017-08-30 04:32:49 UTC (rev 221342)
@@ -1,7 +1,5 @@
PASS Create Request with keep alive values
PASS Clone Request with keep alive values
-FAIL Request with keep alive and ReadableStream body assert_throws: function "() => {
- new Request("", {keepalive: true, body: new ReadableStream(), method: "POST"});
- }" did not throw
+PASS Request with keep alive and ReadableStream body
Modified: trunk/Source/WebCore/ChangeLog (221341 => 221342)
--- trunk/Source/WebCore/ChangeLog 2017-08-30 04:20:45 UTC (rev 221341)
+++ trunk/Source/WebCore/ChangeLog 2017-08-30 04:32:49 UTC (rev 221342)
@@ -1,3 +1,15 @@
+2017-08-29 Youenn Fablet <[email protected]>
+
+ [Fetch API] Request should throw when keep alive is true and body is a ReadableStream
+ https://bugs.webkit.org/show_bug.cgi?id=176083
+
+ Reviewed by Alex Christensen.
+
+ Covered by rebased test.
+
+ * Modules/fetch/FetchRequest.cpp:
+ (WebCore::FetchRequest::setBody):
+
2017-08-29 Don Olmstead <[email protected]>
[CMake] Use find_package for zlib
Modified: trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp (221341 => 221342)
--- trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp 2017-08-30 04:20:45 UTC (rev 221341)
+++ trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp 2017-08-30 04:32:49 UTC (rev 221342)
@@ -217,6 +217,9 @@
ASSERT(scriptExecutionContext());
extractBody(*scriptExecutionContext(), WTFMove(body));
+
+ if (m_internalRequest.options.keepAlive && hasReadableStreamBody())
+ return Exception { TypeError, ASCIILiteral("Request cannot have a ReadableStream body and keepalive set to true") };
return { };
}
@@ -229,6 +232,9 @@
m_body = WTFMove(request.m_body);
request.setDisturbed();
}
+
+ if (m_internalRequest.options.keepAlive && hasReadableStreamBody())
+ return Exception { TypeError, ASCIILiteral("Request cannot have a ReadableStream body and keepalive set to true") };
return { };
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes