Bug 39595 - Web Inspector does not respect HTTP status message
Summary: Web Inspector does not respect HTTP status message
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yuta Kitamura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-24 06:18 PDT by Yuta Kitamura
Modified: 2010-05-25 19:35 PDT (History)
9 users (show)

See Also:


Attachments
Patch (8.52 KB, patch)
2010-05-25 04:46 PDT, Yuta Kitamura
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta Kitamura 2010-05-24 06:18:34 PDT
Currently, Web Inspector does not respect the HTTP status message (which comes with HTTP status code). It looks up the predefined set of status messages from the status code (as in Resource.js).

This design introduces a couple of problems:

- It cannot handle the status code which has potentially multiple status texts. For example, "101 Switching Protocols" from HTTP/1.1 vs "101 WebSocket Protocol Handshake" from WebSocket protocol spec. This will be a problem when I'll merge a patch that displays the info for WebSocket in the Web Inspector.

- It cannot handle unknown status codes. In the past I saw a web server that returned a response like "490 <Vendor-specific status text>" (unfortunately I don't remember what service was doing this). In this case the Inspector shows "490 undefined", which does not sound desirable to me. I admit this is a rare case that will not happen often in the wild, though.

Can we use the response text that the server returns?
Comment 1 Joseph Pecoraro 2010-05-24 08:45:06 PDT
I think thats a good idea. Like XHR's `statusText` property.
Comment 2 Yuta Kitamura 2010-05-25 04:46:13 PDT
Created attachment 57008 [details]
Patch
Comment 3 Pavel Feldman 2010-05-25 15:00:35 PDT
Comment on attachment 57008 [details]
Patch

Thanks for fixing this!
Comment 4 Yuta Kitamura 2010-05-25 18:53:13 PDT
Thank you for review!

I've found a typo in ChangeLog ("HTTP attributes" -> "HTML attributes").

Ukai-san, could you commit this patch after the typo is fixed?
Comment 5 Fumitoshi Ukai 2010-05-25 19:35:30 PDT
Committed r60206: <http://trac.webkit.org/changeset/60206>