[Webkit-unassigned] [Bug 86344] [BlackBerry] xhr request to non existent file response is 0 and not 404.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 15 03:11:14 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=86344





--- Comment #10 from Jason <jason.liu at torchmobile.com.cn>  2012-05-15 03:10:18 PST ---
> So the code change looks good to me.  But I think "isError(m_extendedStatusCode) && !m_dataReceived && m_handle->firstRequest().httpMethod() != "HEAD"" should be put into a helper function so that if it's changed again it only needs to be changed in one place.
> 
> Also, are we sure that an XHR "GET" for to a server that returns just 404 with no data doesn't have the same problem?  Maybe we should also change the "HEAD" check to a check for TargetIsMainFrame || TargetIsSubframe (since we only ever need to call didFail and create an error page for errors that will actually be displayed in a frame), or a check for TargetIsXHR (if didFail has side effects that we should be triggering everywhere expect in an XHR).

hi,Joe
This is a good suggestion. 
I've written function shouldNotifyClientFailed() for this "if" condition sentence. and a new patch attached.

I tested with google's chrome and Safari.
They don't treat 404 for "GET" without content as a failure, but we do.
So I think we should only treat (status<0) as a failure to XMLHttpRequest instead of adding "HEAD" check.

Do you think so?

Thanks for your help.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list