[Webkit-unassigned] [Bug 38428] HTTP code 500 (and other non-4xx codes) wrongfully treated as success for subresources

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 3 11:01:09 PDT 2010


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





--- Comment #3 from Brady Eidson <beidson at apple.com>  2010-05-03 11:01:07 PST ---
(In reply to comment #2)
> Yes, we wrongfully only treat 4xx as error for subresources:
> 
>     if (resource->response().httpStatusCode() / 100 == 4) {
>         // Treat a 4xx response like a network error for all resources but
> images (which will ignore the error and continue to load for 
>         // legacy compatibility).
>         resource->httpStatusCodeError();
>         return;
>     }

Funny thing is we do a `>= 400` check in many other places.


Resource.js:         
if (this.statusCode >= 400)

InspectorController.cpp:     
if (response.httpStatusCode() >= 400) {

DocumentLoader.cpp:     
return m_substituteData.isValid() || m_response.httpStatusCode() >= 400;

HistoryController.cpp:     
if (!unreachableURL.isEmpty() || !docLoader ||
docLoader->response().httpStatusCode() >= 400)

NetscapePlugInStreamLoader.cpp:     
if (response.httpStatusCode() < 100 || response.httpStatusCode() >= 400)

I wonder if there's any particular reason the cache doesn't do that, or if it's
just an ancient bug.

-- 
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