Closed Bug 1673611 Opened 5 years ago Closed 5 years ago

Make Http3Stream::WriteSegments be similar to nsHttpConnection::WriteSegments

Categories

(Core :: Networking: HTTP, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: dragana, Assigned: dragana)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(3 files)

This should also add handling of stream errors that occurred while reading.
Until now this error were a connection error and they were handled by the Http3Session, but let's handling it by the stream as well.

This refactor should not change behavior.

  • This will make handling of responses contain only headers in the same way as the responses with
    a resonce body
  • This will also make sure we pick up an error if neqo_http3conn_read_response_data return one.
Attached file Add a quic server

This will allow us to make response that violate the Http3 protocol and cause a protocol error.
Currently the server returns only one response, we may extend it if needed.

  • We have an assumption that SetResponseHeaders will be called before WriteSegments is called for the first time. I would like to make it more structural add add a new state BEFORE_HEADERS
  • mDataReceived was never set, which is wrong.
  • Almost any error that occurs during ReadResponseData is a connection error and neqo will handle it internally by closing the session. This will be read by necko as ConnectionState change event. Therefore ignore errors received from mHttp3Connection->ReadResponseData and let the ConnectionChange event close the stream.
  • This also adds a test. Because the stream has received some data already the transaction will br closed with the NS_ERROR_NET_PARTIAL_TRANSFER error.
Pushed by ddamjanovic@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ddde8f600dd Rewrite Http3Stream::WriteSegments to be similar to the nsHttpConnection's implementation r=necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/c7e36d0608f6 Add a quic server r=necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/b4c5c16eb5d4 Improve Http3Stream state machine and add a test for a protocol error r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: