Changeset 68906 in webkit
- Timestamp:
- Oct 1, 2010 11:40:19 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r68904 r68906 1 2010-10-01 Robert Hogan <robert@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 [Qt] Fix http/tests/loading/redirect-methods.html 6 7 https://bugs.webkit.org/show_bug.cgi?id=41571 8 9 Unskip http/tests/loading/redirect-methods.html 10 11 * platform/qt/Skipped: 12 1 13 2010-09-30 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/LayoutTests/platform/qt/Skipped
r68872 r68906 182 182 # https://bugs.webkit.org/show_bug.cgi?id=44282 183 183 http/tests/incremental/slow-utf8-text.pl 184 185 # webkit.org/b/41571186 http/tests/loading/redirect-methods.html187 184 188 185 # expected results need updating -
trunk/WebCore/ChangeLog
r68905 r68906 1 2010-10-01 Robert Hogan <robert@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 [Qt] Fix http/tests/loading/redirect-methods.html 6 7 Document our redirection behaviour too. 8 9 https://bugs.webkit.org/show_bug.cgi?id=41571 10 11 * platform/network/qt/QNetworkReplyHandler.cpp: 12 (WebCore::QNetworkReplyHandler::QNetworkReplyHandler): 13 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): 14 * platform/network/qt/QNetworkReplyHandler.h: 15 1 16 2010-10-01 Adam Roben <aroben@apple.com> 2 17 -
trunk/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
r68510 r68906 136 136 { 137 137 return true; 138 } 139 140 static QString httpMethodString(QNetworkAccessManager::Operation method) 141 { 142 switch (method) { 143 case QNetworkAccessManager::GetOperation: 144 return "GET"; 145 case QNetworkAccessManager::HeadOperation: 146 return "HEAD"; 147 case QNetworkAccessManager::PostOperation: 148 return "POST"; 149 case QNetworkAccessManager::PutOperation: 150 return "PUT"; 151 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) 152 case QNetworkAccessManager::DeleteOperation: 153 return "DELETE"; 154 #endif 155 #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) 156 case QNetworkAccessManager::CustomOperation: 157 return "OPTIONS"; 158 #endif 159 default: 160 return "GET"; 161 } 138 162 } 139 163 … … 360 384 m_redirected = true; 361 385 386 387 // Status Code 301 (Moved Permanently), 302 (Moved Temporarily), 303 (See Other): 388 // - If original request is POST convert to GET and redirect automatically 389 // Status Code 307 (Temporary Redirect) and all other redirect status codes: 390 // - Use the HTTP method from the previous request 391 if ((statusCode >= 301 && statusCode <= 303) && m_resourceHandle->firstRequest().httpMethod() == "POST") 392 m_method = QNetworkAccessManager::GetOperation; 393 362 394 ResourceRequest newRequest = m_resourceHandle->firstRequest(); 395 newRequest.setHTTPMethod(httpMethodString(m_method)); 363 396 newRequest.setURL(newUrl); 364 365 if (((statusCode >= 301 && statusCode <= 303) || statusCode == 307) && newRequest.httpMethod() == "POST") {366 m_method = QNetworkAccessManager::GetOperation;367 newRequest.setHTTPMethod("GET");368 }369 397 370 398 // Should not set Referer after a redirect from a secure resource to non-secure one.
Note: See TracChangeset
for help on using the changeset viewer.