Changeset 49077 in webkit
- Timestamp:
- Oct 4, 2009 1:01:19 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r49076 r49077 1 2009-10-04 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Gustavo Noronha. 4 5 [GTK] performs a POST when refreshing a view that was obtained with a GET 6 https://bugs.webkit.org/show_bug.cgi?id=29761 7 8 New test that checks that a reload after a redirect to a page with 9 a GET method from one with a POST method will use GET and not 10 POST. 11 12 * http/tests/navigation/postredirect-reload-expected.txt: Added. 13 * http/tests/navigation/postredirect-reload.html: Added. 14 * http/tests/navigation/resources/postresult.pl: 15 * http/tests/navigation/resources/reloadresult.pl: Added. 16 * http/tests/navigation/resources/redirect-reload.html: Added. 17 * http/tests/navigation/resources/success200.html: 18 * http/tests/navigation/resources/testcode.js: 19 (submitFormWithPostRedirectReload): 20 (runRedirectReloadTest): 21 1 22 2009-10-04 Xan Lopez <xlopez@igalia.com> 2 23 -
trunk/LayoutTests/http/tests/navigation/resources/postresult.pl
r49076 r49077 12 12 $submitWithPost = $query->param('submitwithpost'); 13 13 $submitWithPostRedirect = $query->param('submitwithpostredirect'); 14 $submitWithPostRedirectReload = $query->param('submitwithpostredirectreload'); 14 15 $redirectHappened = $query->param('redirectHappened'); 15 16 $method = $query->request_method(); … … 36 37 <br> 37 38 This page was requested with an HTTP $method 39 </body> 40 </html> 41 HERE_DOC_END 42 43 } elsif ($submitWithPostRedirectReload && $method eq "POST") { 44 45 print "Status: 303 See Other\r\n"; 46 print "Location: reloadresult.pl\r\n"; 47 print "Content-type: text/html\r\n"; 48 print "\r\n"; 49 50 print <<HERE_DOC_END 51 <html> 52 <body style="font-size: 32"> 53 This page should not be seen - it is a 303 redirect to another page. 38 54 </body> 39 55 </html> -
trunk/LayoutTests/http/tests/navigation/resources/testcode.js
r49076 r49077 37 37 testDoc = (window.frames.length == 0) ? document : window.frames['main'].document; 38 38 testDoc.getElementById('testform').submitwithpostredirect.click(); 39 } 40 41 // utility function to make a form post, using the postredirect idiom 42 function submitFormWithPostRedirectReload() { 43 testDoc = (window.frames.length == 0) ? document : window.frames['main'].document; 44 testDoc.getElementById('testform').submitwithpostredirectreload.click(); 39 45 } 40 46 … … 150 156 layoutTestController.queueLoad(testCase); 151 157 } 158 159 // A sequence testing a reload after a redirect. The goal is to check 160 // that in a reload we use the method set by the redirect, GET, 161 // instead of the original one, POST. 162 function runRedirectReloadTest(testCase) { 163 layoutTestController.dumpBackForwardList(); 164 layoutTestController.queueLoad(testCase); 165 layoutTestController.queueLoadingScript("submitFormWithPostRedirectReload()"); 166 layoutTestController.queueReload(); 167 } -
trunk/WebCore/ChangeLog
r49076 r49077 1 2009-10-04 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Gustova Noronha. 4 5 [GTK] performs a POST when refreshing a view that was obtained with a GET 6 https://bugs.webkit.org/show_bug.cgi?id=29761 7 8 Update the HTTP method in the request stored by willSendRequest 9 after a redirect, since it could have changed. 10 11 Test: http/tests/navigation/postredirect-reload.html 12 13 * platform/network/soup/ResourceHandleSoup.cpp: 14 (WebCore::restartedCallback): 15 1 16 2009-10-04 Xan Lopez <xlopez@igalia.com> 2 17 -
trunk/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r49076 r49077 199 199 ResourceResponse response; 200 200 request.setURL(newURL); 201 request.setHTTPMethod(msg->method); 201 202 fillResponseFromMessage(msg, &response); 202 203 if (d->client())
Note: See TracChangeset
for help on using the changeset viewer.