[Qt] Fix http/tests/xmlhttprequest/cache-override.html
Created attachment 96885 [details] Patch
Comment on attachment 96885 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=96885&action=review > Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:424 > if (httpStatusCode == 401 || httpStatusCode == 407) > return true; This if became useless after this change. > Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:427 > - if (receivedData && (httpStatusCode >= 400 && httpStatusCode < 600)) > + if (httpStatusCode >= 400 && httpStatusCode < 600) > return true; The idea here is to show to the user the content sent by the server, if some content was sent by the server. If the server did not send any content then we do not ignore the error and we may provide a special page with some information to the user instead of a blank screen. Most of the browsers do it. When the error is not ignored ResourceHandleClient::didFail() is called. Isn't ResourceHandleClient responsible for handling the error?
(In reply to comment #2) > > Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:424 > > if (httpStatusCode == 401 || httpStatusCode == 407) > > return true; > > This if became useless after this change. Good point! > The idea here is to show to the user the content sent by the server, if some content was sent by the server. > If the server did not send any content then we do not ignore the error and we may provide a special page with some information to the user instead of a blank screen. Most of the browsers do it. How is the client receiving notice of the error? Won't he get it anyway from the unsupportedContent() signal ? From what I can tell in other ports, didFail() is only used when there has been a transport error of some sort.
(In reply to comment #3) > (In reply to comment #2) > > > The idea here is to show to the user the content sent by the server, if some content was sent by the server. > > If the server did not send any content then we do not ignore the error and we may provide a special page with some information to the user instead of a blank screen. Most of the browsers do it. > > How is the client receiving notice of the error? Won't he get it anyway from the unsupportedContent() signal ? From what I can tell in other ports, didFail() is only used when there has been a transport error of some sort. Look at FrameLoaderClientQt::callErrorPageExtension. By default QtTestBrowser will show a page containing the http error string and title 'Failed loading page' when it receives a message that has no content. No, unsupportedContent will probably not help.
Comment on attachment 96885 [details] Patch Clearing review for now.
=== Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.