HTTP/2 and HTTP/3 should not reparse the headers.
Categories
(Core :: Networking: HTTP, enhancement, P2)
Tracking
()
People
(Reporter: valentin, Assigned: valentin)
References
(Blocks 3 open bugs, Regressed 1 open bug)
Details
(Keywords: leave-open, Whiteboard: [necko-triaged][necko-priority-next])
Attachments
(4 files, 2 obsolete files)
As can be noticed in bug 1965246, we have an odd way of passing headers from the transaction to the H2 and H3 stream.
When opening the channel and creating the transaction, we'll serialize the requestHead in mozilla::net::nsHttpTransaction::Init on the main thread.
Then we create an input stream that contains the headers and possibly body.
When the transaction gets dispatched we call:
mozilla::net::nsHttpTransaction::ReadSegments
-> mozilla::net::nsAHttpSegmentReader::OnReadSegment which reads from the stream.
The headers then get read into a different string for H2 in mozilla::net::Http2StreamBase::OnReadSegment then passed to EncodeHeaderBlock in mozilla::net::Http2Stream::GenerateHeaders which parses the string and compresses the headers with HPACK mozilla::net::Http2Compressor::EncodeHeaderBlock.
Similarly for H3 mFlatHttpRequestHeaders gets passed into neqo that again parses it into a header array in neqo_http3conn_fetch
Just passing in a nsHttpRequestHead* to HPACK and neqo_http3conn_fetch would be much better - it would avoid the allocations and reparsing.
| Assignee | ||
Comment 1•5 months ago
|
||
Updated•3 months ago
|
| Assignee | ||
Comment 2•3 months ago
|
||
Backed out for causing mocitest http3 failures @ test_XHRSendData.html
- https://hg.mozilla.org/integration/autoland/rev/5efb7b69f7304c7e448836c37d0f1c51e6201951
- Push with failures
- Failure Log test_XHRSendData.html
- Failure Log mochitest/test_bug_776171.html
- Failure Log mochitest/test_xhr_method_case.html
- Failure Log test_bug444722.html
- Push with failures | WPT T2
- Failure Log | WPT T2
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 6•1 month ago
|
||
| Assignee | ||
Comment 7•1 month ago
|
||
| Assignee | ||
Comment 8•1 month ago
|
||
| Assignee | ||
Comment 9•1 month ago
|
||
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
Comment 10•1 month ago
|
||
Comment 11•1 month ago
|
||
| bugherder | ||
Description
•