Bug 62515 - [Qt] Fix http/tests/xmlhttprequest/cache-override.html
Summary: [Qt] Fix http/tests/xmlhttprequest/cache-override.html
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 62929
  Show dependency treegraph
 
Reported: 2011-06-12 11:39 PDT by Robert Hogan
Modified: 2014-02-03 03:17 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.70 KB, patch)
2011-06-12 11:56 PDT, Robert Hogan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hogan 2011-06-12 11:39:59 PDT
[Qt] Fix http/tests/xmlhttprequest/cache-override.html
Comment 1 Robert Hogan 2011-06-12 11:56:18 PDT
Created attachment 96885 [details]
Patch
Comment 2 Luiz Agostini 2011-06-14 11:14:20 PDT
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?
Comment 3 Robert Hogan 2011-06-14 11:59:12 PDT
(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.
Comment 4 Luiz Agostini 2011-06-16 12:36:14 PDT
(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 5 Robert Hogan 2011-08-03 14:43:41 PDT
Comment on attachment 96885 [details]
Patch

Clearing review for now.
Comment 6 Jocelyn Turcotte 2014-02-03 03:17:56 PST
=== 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.