Bug 116543

Summary: [BlackBerry] Reveal HTTP error code for XHR even if there is no response body
Product: WebKit Reporter: Leo Yang <leoyang>
Component: WebKit BlackBerryAssignee: Leo Yang <leoyang>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, joenotcharles, rwlbuis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.