Use the format defined in the specification for HTTP/2 Response/Request Headers
Categories
(DevTools :: Netmonitor, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: karlcow, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Hello,
This is a followup on a bug that I had initially opened on WebKit, but it seems WebKit is doing the right thing.
https://bugs.webkit.org/show_bug.cgi?id=263931
- With Safari
- Go to https://apple.com/ which is HTTP/2
- Open Web Inspector
- Network Tab
- Ctrl+click on a resource and Copy HTTP Response or Request Headers.
HTTP Request
:method: GET
:scheme: https
:authority: www.apple.com
:path: /
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Sec-Fetch-Site: none
Cookie: ****
Accept-Encoding: gzip, deflate, br
Sec-Fetch-Mode: navigate
Host: www.apple.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Safari/605.1.15
Accept-Language: en-US,en;q=0.9
Sec-Fetch-Dest: document
Connection: keep-alive
and the HTTP Response:
:status: 200
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Content-Security-Policy: *******
X-XSS-Protection: 1; mode=block
Content-Encoding: gzip
Expires: Mon, 30 Oct 2023 22:46:56 GMT
Referrer-Policy: no-referrer-when-downgrade
Cache-Control: max-age=94
Date: Mon, 30 Oct 2023 22:45:22 GMT
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Server: Apple
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
x-cache: *****
Firefox devtools will give a format which is similar to HTTP/1.1
The spec says for Response for example
https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.4
8.1.2.4. Response Pseudo-Header Fields
For HTTP/2 responses, a single ":status" pseudo-header field is
defined that carries the HTTP status code field (see [RFC7231],
Section 6). This pseudo-header field MUST be included in all
responses; otherwise, the response is malformed (Section 8.1.2.6).
HTTP/2 does not define a way to carry the version or reason phrase
that is included in an HTTP/1.1 status line.
Comment 1•2 years ago
|
||
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Thanks for reporting!
Tested Safari and Chrome and can confirm they show different formats for Http/2 vs HTTP 1.1.
We should also update the Request and Response headers in the Headers side panel. See attachments for differences between Firefox vs Chrome.
Description
•