+2012-04-03 Dominik Röttsches <dominik.rottsches@linux.intel.com>
+
+ Soup HTTP backend does not send Content-Length in certain cases
+ https://bugs.webkit.org/show_bug.cgi?id=82036
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Rebaselining and unskipping relevant tests for EFL.
+ Rebaselining POST and PUT cases for GTK.
+
+ * platform/efl/Skipped:
+ * platform/efl/http/tests/xmlhttprequest/methods-async-expected.txt: Copied from LayoutTests/platform/gtk/http/tests/xmlhttprequest/methods-async-expected.txt.
+ * platform/efl/http/tests/xmlhttprequest/methods-expected.txt: Copied from LayoutTests/platform/gtk/http/tests/xmlhttprequest/methods-expected.txt.
+ * platform/efl/http/tests/xmlhttprequest/workers/methods-async-expected.txt: Copied from LayoutTests/platform/gtk/http/tests/xmlhttprequest/workers/methods-async-expected.txt.
+ * platform/efl/http/tests/xmlhttprequest/workers/methods-expected.txt: Copied from LayoutTests/platform/gtk/http/tests/xmlhttprequest/workers/methods-expected.txt.
+ * platform/efl/http/tests/xmlhttprequest/workers/shared-worker-methods-async-expected.txt: Copied from LayoutTests/platform/gtk/http/tests/xmlhttprequest/workers/shared-worker-methods-async-expected.txt.
+ * platform/efl/http/tests/xmlhttprequest/workers/shared-worker-methods-expected.txt: Copied from LayoutTests/platform/gtk/http/tests/xmlhttprequest/workers/shared-worker-methods-expected.txt.
+ * platform/gtk/http/tests/xmlhttprequest/methods-async-expected.txt:
+ * platform/gtk/http/tests/xmlhttprequest/methods-expected.txt:
+ * platform/gtk/http/tests/xmlhttprequest/workers/methods-async-expected.txt:
+ * platform/gtk/http/tests/xmlhttprequest/workers/methods-expected.txt:
+ * platform/gtk/http/tests/xmlhttprequest/workers/shared-worker-methods-async-expected.txt:
+ * platform/gtk/http/tests/xmlhttprequest/workers/shared-worker-methods-expected.txt:
+
2012-04-03 Christophe Dumez <christophe.dumez@intel.com>
[EFL] LayoutTestController needs implementation of setDefersLoading
http/tests/xmlhttprequest/cross-origin-no-authorization.html
http/tests/xmlhttprequest/failed-auth.html
http/tests/xmlhttprequest/logout.html
-http/tests/xmlhttprequest/methods.html
-http/tests/xmlhttprequest/methods-async.html
http/tests/xmlhttprequest/origin-whitelisting-all.html
http/tests/xmlhttprequest/origin-whitelisting-exact-match.html
http/tests/xmlhttprequest/origin-whitelisting-ip-addresses.html
http/tests/xmlhttprequest/origin-whitelisting-subdomains.html
http/tests/xmlhttprequest/remember-bad-password.html
http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html
-http/tests/xmlhttprequest/workers/shared-worker-methods.html
-http/tests/xmlhttprequest/workers/methods.html
-http/tests/xmlhttprequest/workers/methods-async.html
-http/tests/xmlhttprequest/workers/shared-worker-methods-async.html
http/tests/xmlviewer/extensions-api.html
# These test cases don't have expected result yet.
--- /dev/null
+Tests for bug 3812 - GET and POST should not be the only HTTP methods implemented in XMLHttpRequest.
+
+GET(""): GET(null bytes), Content-Type: null
+GET(null): GET(null bytes), Content-Type: null
+GET("123"): GET(null bytes), Content-Type: null
+POST(""): POST(0 bytes), Content-Type: application/xml
+POST(null): POST(0 bytes), Content-Type: null
+POST("123"): POST(3 bytes), Content-Type: application/xml
+PUT(""): PUT(0 bytes), Content-Type: application/xml
+PUT(null): PUT(0 bytes), Content-Type: null
+PUT("123"): PUT(3 bytes), Content-Type: application/xml
+DELETE(""): DELETE(0 bytes), Content-Type: application/xml
+DELETE(null): DELETE(null bytes), Content-Type: null
+DELETE("123"): DELETE(3 bytes), Content-Type: application/xml
+HEAD(""): HEAD(null bytes), Content-Type: null
+HEAD(null): HEAD(null bytes), Content-Type: null
+HEAD("123"): HEAD(null bytes), Content-Type: null
+WKFOOBAR(""): WKFOOBAR(0 bytes), Content-Type: application/xml
+WKFOOBAR(null): WKFOOBAR(null bytes), Content-Type: null
+WKFOOBAR("123"): WKFOOBAR(3 bytes), Content-Type: application/xml
+SEARCH(""): SEARCH(0 bytes), Content-Type: application/xml
+SEARCH(null): SEARCH(null bytes), Content-Type: null
+SEARCH("123"): SEARCH(3 bytes), Content-Type: application/xml
--- /dev/null
+Tests for bug 3812 - GET and POST should not be the only HTTP methods implemented in XMLHttpRequest.
+
+GET(""): GET(null bytes), Content-Type: null
+GET(null): GET(null bytes), Content-Type: null
+GET("123"): GET(null bytes), Content-Type: null
+POST(""): POST(0 bytes), Content-Type: application/xml
+POST(null): POST(0 bytes), Content-Type: null
+POST("123"): POST(3 bytes), Content-Type: application/xml
+PUT(""): PUT(0 bytes), Content-Type: application/xml
+PUT(null): PUT(0 bytes), Content-Type: null
+PUT("123"): PUT(3 bytes), Content-Type: application/xml
+DELETE(""): DELETE(0 bytes), Content-Type: application/xml
+DELETE(null): DELETE(null bytes), Content-Type: null
+DELETE("123"): DELETE(3 bytes), Content-Type: application/xml
+HEAD(""): HEAD(null bytes), Content-Type: null
+HEAD(null): HEAD(null bytes), Content-Type: null
+HEAD("123"): HEAD(null bytes), Content-Type: null
+WKFOOBAR(""): WKFOOBAR(0 bytes), Content-Type: application/xml
+WKFOOBAR(null): WKFOOBAR(null bytes), Content-Type: null
+WKFOOBAR("123"): WKFOOBAR(3 bytes), Content-Type: application/xml
+SEARCH(""): SEARCH(0 bytes), Content-Type: application/xml
+SEARCH(null): SEARCH(null bytes), Content-Type: null
+SEARCH("123"): SEARCH(3 bytes), Content-Type: application/xml
--- /dev/null
+GET and POST should not be the only HTTP methods implemented in XMLHttpRequest for Workers.
+
+GET(""): GET(null bytes), Content-Type: null
+GET(null): GET(null bytes), Content-Type: null
+GET("123"): GET(null bytes), Content-Type: null
+POST(""): POST(0 bytes), Content-Type: application/xml
+POST(null): POST(0 bytes), Content-Type: null
+POST("123"): POST(3 bytes), Content-Type: application/xml
+PUT(""): PUT(0 bytes), Content-Type: application/xml
+PUT(null): PUT(0 bytes), Content-Type: null
+PUT("123"): PUT(3 bytes), Content-Type: application/xml
+DELETE(""): DELETE(0 bytes), Content-Type: application/xml
+DELETE(null): DELETE(null bytes), Content-Type: null
+DELETE("123"): DELETE(3 bytes), Content-Type: application/xml
+HEAD(""): HEAD(null bytes), Content-Type: null
+HEAD(null): HEAD(null bytes), Content-Type: null
+HEAD("123"): HEAD(null bytes), Content-Type: null
+WKFOOBAR(""): WKFOOBAR(0 bytes), Content-Type: application/xml
+WKFOOBAR(null): WKFOOBAR(null bytes), Content-Type: null
+WKFOOBAR("123"): WKFOOBAR(3 bytes), Content-Type: application/xml
+SEARCH(""): SEARCH(0 bytes), Content-Type: application/xml
+SEARCH(null): SEARCH(null bytes), Content-Type: null
+SEARCH("123"): SEARCH(3 bytes), Content-Type: application/xml
+DONE
--- /dev/null
+GET and POST should not be the only HTTP methods implemented in XMLHttpRequest for Workers.
+
+GET(""): GET(null bytes), Content-Type: null
+GET(null): GET(null bytes), Content-Type: null
+GET("123"): GET(null bytes), Content-Type: null
+POST(""): POST(0 bytes), Content-Type: application/xml
+POST(null): POST(0 bytes), Content-Type: null
+POST("123"): POST(3 bytes), Content-Type: application/xml
+PUT(""): PUT(0 bytes), Content-Type: application/xml
+PUT(null): PUT(0 bytes), Content-Type: null
+PUT("123"): PUT(3 bytes), Content-Type: application/xml
+DELETE(""): DELETE(0 bytes), Content-Type: application/xml
+DELETE(null): DELETE(null bytes), Content-Type: null
+DELETE("123"): DELETE(3 bytes), Content-Type: application/xml
+HEAD(""): HEAD(null bytes), Content-Type: null
+HEAD(null): HEAD(null bytes), Content-Type: null
+HEAD("123"): HEAD(null bytes), Content-Type: null
+WKFOOBAR(""): WKFOOBAR(0 bytes), Content-Type: application/xml
+WKFOOBAR(null): WKFOOBAR(null bytes), Content-Type: null
+WKFOOBAR("123"): WKFOOBAR(3 bytes), Content-Type: application/xml
+SEARCH(""): SEARCH(0 bytes), Content-Type: application/xml
+SEARCH(null): SEARCH(null bytes), Content-Type: null
+SEARCH("123"): SEARCH(3 bytes), Content-Type: application/xml
+DONE
--- /dev/null
+GET and POST should not be the only HTTP methods implemented in XMLHttpRequest for SharedWorkers.
+
+GET(""): GET(null bytes), Content-Type: null
+GET(null): GET(null bytes), Content-Type: null
+GET("123"): GET(null bytes), Content-Type: null
+POST(""): POST(0 bytes), Content-Type: application/xml
+POST(null): POST(0 bytes), Content-Type: null
+POST("123"): POST(3 bytes), Content-Type: application/xml
+PUT(""): PUT(0 bytes), Content-Type: application/xml
+PUT(null): PUT(0 bytes), Content-Type: null
+PUT("123"): PUT(3 bytes), Content-Type: application/xml
+DELETE(""): DELETE(0 bytes), Content-Type: application/xml
+DELETE(null): DELETE(null bytes), Content-Type: null
+DELETE("123"): DELETE(3 bytes), Content-Type: application/xml
+HEAD(""): HEAD(null bytes), Content-Type: null
+HEAD(null): HEAD(null bytes), Content-Type: null
+HEAD("123"): HEAD(null bytes), Content-Type: null
+WKFOOBAR(""): WKFOOBAR(0 bytes), Content-Type: application/xml
+WKFOOBAR(null): WKFOOBAR(null bytes), Content-Type: null
+WKFOOBAR("123"): WKFOOBAR(3 bytes), Content-Type: application/xml
+SEARCH(""): SEARCH(0 bytes), Content-Type: application/xml
+SEARCH(null): SEARCH(null bytes), Content-Type: null
+SEARCH("123"): SEARCH(3 bytes), Content-Type: application/xml
+DONE
--- /dev/null
+GET and POST should not be the only HTTP methods implemented in XMLHttpRequest for SharedWorkers.
+
+GET(""): GET(null bytes), Content-Type: null
+GET(null): GET(null bytes), Content-Type: null
+GET("123"): GET(null bytes), Content-Type: null
+POST(""): POST(0 bytes), Content-Type: application/xml
+POST(null): POST(0 bytes), Content-Type: null
+POST("123"): POST(3 bytes), Content-Type: application/xml
+PUT(""): PUT(0 bytes), Content-Type: application/xml
+PUT(null): PUT(0 bytes), Content-Type: null
+PUT("123"): PUT(3 bytes), Content-Type: application/xml
+DELETE(""): DELETE(0 bytes), Content-Type: application/xml
+DELETE(null): DELETE(null bytes), Content-Type: null
+DELETE("123"): DELETE(3 bytes), Content-Type: application/xml
+HEAD(""): HEAD(null bytes), Content-Type: null
+HEAD(null): HEAD(null bytes), Content-Type: null
+HEAD("123"): HEAD(null bytes), Content-Type: null
+WKFOOBAR(""): WKFOOBAR(0 bytes), Content-Type: application/xml
+WKFOOBAR(null): WKFOOBAR(null bytes), Content-Type: null
+WKFOOBAR("123"): WKFOOBAR(3 bytes), Content-Type: application/xml
+SEARCH(""): SEARCH(0 bytes), Content-Type: application/xml
+SEARCH(null): SEARCH(null bytes), Content-Type: null
+SEARCH("123"): SEARCH(3 bytes), Content-Type: application/xml
+DONE
GET(null): GET(null bytes), Content-Type: null
GET("123"): GET(null bytes), Content-Type: null
POST(""): POST(0 bytes), Content-Type: application/xml
-POST(null): POST(null bytes), Content-Type: null
+POST(null): POST(0 bytes), Content-Type: null
POST("123"): POST(3 bytes), Content-Type: application/xml
PUT(""): PUT(0 bytes), Content-Type: application/xml
-PUT(null): PUT(null bytes), Content-Type: null
+PUT(null): PUT(0 bytes), Content-Type: null
PUT("123"): PUT(3 bytes), Content-Type: application/xml
DELETE(""): DELETE(0 bytes), Content-Type: application/xml
DELETE(null): DELETE(null bytes), Content-Type: null
GET(null): GET(null bytes), Content-Type: null
GET("123"): GET(null bytes), Content-Type: null
POST(""): POST(0 bytes), Content-Type: application/xml
-POST(null): POST(null bytes), Content-Type: null
+POST(null): POST(0 bytes), Content-Type: null
POST("123"): POST(3 bytes), Content-Type: application/xml
PUT(""): PUT(0 bytes), Content-Type: application/xml
-PUT(null): PUT(null bytes), Content-Type: null
+PUT(null): PUT(0 bytes), Content-Type: null
PUT("123"): PUT(3 bytes), Content-Type: application/xml
DELETE(""): DELETE(0 bytes), Content-Type: application/xml
DELETE(null): DELETE(null bytes), Content-Type: null
GET(null): GET(null bytes), Content-Type: null
GET("123"): GET(null bytes), Content-Type: null
POST(""): POST(0 bytes), Content-Type: application/xml
-POST(null): POST(null bytes), Content-Type: null
+POST(null): POST(0 bytes), Content-Type: null
POST("123"): POST(3 bytes), Content-Type: application/xml
PUT(""): PUT(0 bytes), Content-Type: application/xml
-PUT(null): PUT(null bytes), Content-Type: null
+PUT(null): PUT(0 bytes), Content-Type: null
PUT("123"): PUT(3 bytes), Content-Type: application/xml
DELETE(""): DELETE(0 bytes), Content-Type: application/xml
DELETE(null): DELETE(null bytes), Content-Type: null
GET(null): GET(null bytes), Content-Type: null
GET("123"): GET(null bytes), Content-Type: null
POST(""): POST(0 bytes), Content-Type: application/xml
-POST(null): POST(null bytes), Content-Type: null
+POST(null): POST(0 bytes), Content-Type: null
POST("123"): POST(3 bytes), Content-Type: application/xml
PUT(""): PUT(0 bytes), Content-Type: application/xml
-PUT(null): PUT(null bytes), Content-Type: null
+PUT(null): PUT(0 bytes), Content-Type: null
PUT("123"): PUT(3 bytes), Content-Type: application/xml
DELETE(""): DELETE(0 bytes), Content-Type: application/xml
DELETE(null): DELETE(null bytes), Content-Type: null
GET(null): GET(null bytes), Content-Type: null
GET("123"): GET(null bytes), Content-Type: null
POST(""): POST(0 bytes), Content-Type: application/xml
-POST(null): POST(null bytes), Content-Type: null
+POST(null): POST(0 bytes), Content-Type: null
POST("123"): POST(3 bytes), Content-Type: application/xml
PUT(""): PUT(0 bytes), Content-Type: application/xml
-PUT(null): PUT(null bytes), Content-Type: null
+PUT(null): PUT(0 bytes), Content-Type: null
PUT("123"): PUT(3 bytes), Content-Type: application/xml
DELETE(""): DELETE(0 bytes), Content-Type: application/xml
DELETE(null): DELETE(null bytes), Content-Type: null
GET(null): GET(null bytes), Content-Type: null
GET("123"): GET(null bytes), Content-Type: null
POST(""): POST(0 bytes), Content-Type: application/xml
-POST(null): POST(null bytes), Content-Type: null
+POST(null): POST(0 bytes), Content-Type: null
POST("123"): POST(3 bytes), Content-Type: application/xml
PUT(""): PUT(0 bytes), Content-Type: application/xml
-PUT(null): PUT(null bytes), Content-Type: null
+PUT(null): PUT(0 bytes), Content-Type: null
PUT("123"): PUT(3 bytes), Content-Type: application/xml
DELETE(""): DELETE(0 bytes), Content-Type: application/xml
DELETE(null): DELETE(null bytes), Content-Type: null
+2012-04-03 Dominik Röttsches <dominik.rottsches@linux.intel.com>
+
+ Soup HTTP backend does not send Content-Length in certain cases
+ https://bugs.webkit.org/show_bug.cgi?id=82036
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Telling soup explicitly when to send content-length header
+ in POST & PUT cases in order to align with e.g. Chromium and FF.
+
+ No new tests, already covered by *methods*.html in
+ http/tests/xmlhttprequest/.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startHTTPRequest): Special handling for POST & PUT.
+
2012-04-03 Eric Seidel <eric@webkit.org>
Simplify CSSStyleSelector constructor through the use of a helper function
if (!soup_message_headers_get_one(soupMessage->request_headers, "Accept"))
soup_message_headers_append(soupMessage->request_headers, "Accept", "*/*");
+ // In the case of XHR .send() and .send("") explicitly tell libsoup
+ // to send a zero content-lenght header for consistency
+ // with other backends (e.g. Chromium's) and other UA implementations like FF.
+ // It's done in the backend here instead of in XHR code since in XHR CORS checking
+ // prevents us from this kind of late header manipulation.
+ if ((request.httpMethod() == "POST" || request.httpMethod() == "PUT")
+ && (!request.httpBody() || request.httpBody()->isEmpty()))
+ soup_message_headers_set_content_length(soupMessage->request_headers, 0);
+
// Send the request only if it's not been explicitly deferred.
if (!d->m_defersLoading) {
d->m_cancellable = adoptGRef(g_cancellable_new());