[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:40:30 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 03428bbdcfb600b398a91852c8d1808cd5207e5d
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 15 17:12:46 2010 +0000
2010-10-15 Sergio Villar Senin <svillar at igalia.com>
Reviewed by Gustavo Noronha Silva.
[Soup] Should not ignore body for redirection responses
https://bugs.webkit.org/show_bug.cgi?id=29299
Tests that 302 redirections without Location do not ignore the
body for redirection purpouses (the body could have a meta
http-equiv=refresh)
* http/tests/navigation/redirect302-metaredirect-expected.txt: Added.
* http/tests/navigation/redirect302-metaredirect.html: Added.
* http/tests/navigation/resources/redirect302-metaredirect.html: Added.
* http/tests/navigation/resources/redirect302-metaredirect.pl: Added.
2010-10-15 Sergio Villar Senin <svillar at igalia.com>
Reviewed by Gustavo Noronha Silva.
[Soup] Should not ignore body for redirection responses
https://bugs.webkit.org/show_bug.cgi?id=29299
Body is now provided to WebKitGtk+ in some redirections (like 302)
because it could be used by servers to perform clunky redirections
for example using http-equiv=REFRESH
Test: http/tests/navigation/redirect302-metaredirect.html
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::gotHeadersCallback):
(WebCore::finishedCallback):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f6e51e5..3da7998 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-15 Sergio Villar Senin <svillar at igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Soup] Should not ignore body for redirection responses
+ https://bugs.webkit.org/show_bug.cgi?id=29299
+
+ Tests that 302 redirections without Location do not ignore the
+ body for redirection purpouses (the body could have a meta
+ http-equiv=refresh)
+
+ * http/tests/navigation/redirect302-metaredirect-expected.txt: Added.
+ * http/tests/navigation/redirect302-metaredirect.html: Added.
+ * http/tests/navigation/resources/redirect302-metaredirect.html: Added.
+ * http/tests/navigation/resources/redirect302-metaredirect.pl: Added.
+
2010-10-15 Nate Chapin <japhet at chromium.org>
Unreviewed, Chromium expectations tweak.
diff --git a/LayoutTests/http/tests/navigation/redirect302-metaredirect-expected.txt b/LayoutTests/http/tests/navigation/redirect302-metaredirect-expected.txt
new file mode 100644
index 0000000..b1de13c
--- /dev/null
+++ b/LayoutTests/http/tests/navigation/redirect302-metaredirect-expected.txt
@@ -0,0 +1,6 @@
+SUCCESS
+
+============== Back Forward List ==============
+ http://127.0.0.1:8000/navigation/redirect302-metaredirect.html **nav target**
+curr-> http://127.0.0.1:8000/navigation/resources/redirect302-metaredirect.html **nav target**
+===============================================
diff --git a/LayoutTests/http/tests/navigation/redirect302-metaredirect.html b/LayoutTests/http/tests/navigation/redirect302-metaredirect.html
new file mode 100644
index 0000000..03fd3fb
--- /dev/null
+++ b/LayoutTests/http/tests/navigation/redirect302-metaredirect.html
@@ -0,0 +1,8 @@
+<script type="text/javascript" src="resources/testcode.js"></script>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ runBasicTest("resources/redirect302-metaredirect.pl", "none");
+</script>
+This page just kicks off a test, and should not appear in the expected test output.
+The files in the resources dir have comments about the tests.
diff --git a/LayoutTests/http/tests/navigation/resources/redirect302-metaredirect.html b/LayoutTests/http/tests/navigation/resources/redirect302-metaredirect.html
new file mode 100644
index 0000000..f925b7b
--- /dev/null
+++ b/LayoutTests/http/tests/navigation/resources/redirect302-metaredirect.html
@@ -0,0 +1,12 @@
+<html>
+<script type="text/javascript" src="testcode.js"></script>
+<script>
+ // needed in case we arrive here via a client redirect
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+</script>
+
+<body>
+SUCCESS
+</body>
+</html>
diff --git a/LayoutTests/http/tests/navigation/resources/redirect302-metaredirect.pl b/LayoutTests/http/tests/navigation/resources/redirect302-metaredirect.pl
new file mode 100755
index 0000000..cd8c11b
--- /dev/null
+++ b/LayoutTests/http/tests/navigation/resources/redirect302-metaredirect.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+# Simple script to generate a 302 HTTP redirect with http-equiv=refresh
+
+print "Status: 302 Found\r\n";
+print "Content-type: text/html\r\n";
+print "\r\n";
+
+print <<HERE_DOC_END
+<html>
+<meta http-equiv="refresh" content="0;URL=redirect302-metaredirect.html">
+<script>
+ if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+</script>
+<body>
+Test failed! - This page uses a meta redirect to load another page.
+The key aspect is that the browser should get the body of the 302
+message and use it to perform a redirect
+</body></html>
+HERE_DOC_END
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 32ff887..92f887e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,22 @@
2010-10-15 Sergio Villar Senin <svillar at igalia.com>
+ Reviewed by Gustavo Noronha Silva.
+
+ [Soup] Should not ignore body for redirection responses
+ https://bugs.webkit.org/show_bug.cgi?id=29299
+
+ Body is now provided to WebKitGtk+ in some redirections (like 302)
+ because it could be used by servers to perform clunky redirections
+ for example using http-equiv=REFRESH
+
+ Test: http/tests/navigation/redirect302-metaredirect.html
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::gotHeadersCallback):
+ (WebCore::finishedCallback):
+
+2010-10-15 Sergio Villar Senin <svillar at igalia.com>
+
Reviewed by Martin Robinson.
[GTK] Fix introspection support
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index 0d62de4..05c659f 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -218,8 +218,10 @@ static void restartedCallback(SoupMessage* msg, gpointer data)
static void gotHeadersCallback(SoupMessage* msg, gpointer data)
{
// For 401, we will accumulate the resource body, and only use it
- // in case authentication with the soup feature doesn't happen
- if (msg->status_code == SOUP_STATUS_UNAUTHORIZED) {
+ // in case authentication with the soup feature doesn't happen.
+ // For 302 we accumulate the body too because it could be used by
+ // some servers to redirect with a clunky http-equiv=REFRESH
+ if (statusWillBeHandledBySoup(msg->status_code)) {
soup_message_body_set_accumulate(msg->response_body, TRUE);
return;
}
@@ -290,7 +292,6 @@ static void gotChunkCallback(SoupMessage* msg, SoupBuffer* chunk, gpointer data)
return;
client->didReceiveData(handle.get(), chunk->data, chunk->length, false);
-
}
static gboolean parseDataUrl(gpointer callbackData)
@@ -494,7 +495,7 @@ static void sendRequestCallback(GObject* source, GAsyncResult* res, gpointer use
return;
}
- if (d->m_soupMessage && d->m_soupMessage->status_code == SOUP_STATUS_UNAUTHORIZED) {
+ if (d->m_soupMessage && statusWillBeHandledBySoup(d->m_soupMessage->status_code)) {
fillResponseFromMessage(soupMsg, &d->m_response);
client->didReceiveResponse(handle.get(), d->m_response);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list