Bug 116543 - [BlackBerry] Reveal HTTP error code for XHR even if there is no response body
Summary: [BlackBerry] Reveal HTTP error code for XHR even if there is no response body
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Leo Yang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-21 08:54 PDT by Leo Yang
Modified: 2013-05-27 08:44 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.40 KB, patch)
2013-05-21 09:17 PDT, Leo Yang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Yang 2013-05-21 08:54:28 PDT
BlackBerry is doing friendly http error handling: if there is no response body for an http error it will display an error message made by the port. But for XHR request, which is not usually displaying error messages to the end user, we should reveal http error code to let the JS know what is the actual server error.
Comment 1 Leo Yang 2013-05-21 09:17:01 PDT
Created attachment 202440 [details]
Patch
Comment 2 Alexey Proskuryakov 2013-05-21 09:49:15 PDT
Comment on attachment 202440 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=202440&action=review

> Source/WebCore/ChangeLog:14
> +        BlackBerry is doing friendly HTTP error handling: if there is no response body
> +        for an HTTP error it will display an error message made by the port. But for a
> +        XHR request, which usually does not result in displaying error messages to the
> +        end user, HTTP error code should be revealed to let the JavaScript know what
> +        the actual server error code is.

Shouldn't the difference be "main resource vs. any subresource"? There is no user visible error reporting for any subresources, not just XHR.
Comment 3 Leo Yang 2013-05-21 10:28:15 PDT
Comment on attachment 202440 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=202440&action=review

>> Source/WebCore/ChangeLog:14
>> +        the actual server error code is.
> 
> Shouldn't the difference be "main resource vs. any subresource"? There is no user visible error reporting for any subresources, not just XHR.

As far as I know only XHR may care about the actual status code in this case. Extends to the subresource might be a good idea but I need to evaluate the potential negative impact.
Comment 4 Leo Yang 2013-05-22 08:00:36 PDT
Comment on attachment 202440 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=202440&action=review

>>> Source/WebCore/ChangeLog:14
>>> +        the actual server error code is.
>> 
>> Shouldn't the difference be "main resource vs. any subresource"? There is no user visible error reporting for any subresources, not just XHR.
> 
> As far as I know only XHR may care about the actual status code in this case. Extends to the subresource might be a good idea but I need to evaluate the potential negative impact.

Based on no-unnecessary-change, I'd like to keep current error handling for subresource `AS IS`.
Comment 5 Rob Buis 2013-05-27 08:11:45 PDT
Comment on attachment 202440 [details]
Patch

Okay.
Comment 6 Leo Yang 2013-05-27 08:41:06 PDT
Comment on attachment 202440 [details]
Patch

Sending to cq.
Comment 7 WebKit Commit Bot 2013-05-27 08:44:57 PDT
Comment on attachment 202440 [details]
Patch

Clearing flags on attachment: 202440

Committed r150759: <http://trac.webkit.org/changeset/150759>
Comment 8 WebKit Commit Bot 2013-05-27 08:44:59 PDT
All reviewed patches have been landed.  Closing bug.