New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
closed streams #145
Closed
Closed
closed streams #145
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1c08483
handle reordered RST_STREAM frames and FIN flags
marten-seemann 782263a
allow reading from streams that a RST_STREAM has been received for
marten-seemann 70bf032
Revert "allow reading from streams that a RST_STREAM has been receive…
marten-seemann 080506c
minor changes, fix typos
marten-seemann File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1473,27 +1473,30 @@ contains a FIN flag or when either peer sends a RST_STREAM frame. | |
|
||
The "closed" state is the terminal state. | ||
|
||
A final offset is present in both a frame bearing a FIN flag and in a RST_STREAM | ||
frame. Upon sending either of these frames for a stream, the endpoint MUST NOT | ||
send a STREAM frame carrying data beyond the final offset. | ||
A final offset is present in both a STREAM frame bearing a FIN flag and in a | ||
RST_STREAM frame. Upon sending either of these frames for a stream, the | ||
endpoint MUST NOT send a STREAM frame carrying data beyond the final offset. | ||
|
||
An endpoint that receives any frame for this stream after receiving either a FIN | ||
flag and all stream data preceding it, or a RST_STREAM frame, MUST quietly | ||
discard the frame, with one exception. If a STREAM frame carrying data beyond | ||
the received final offset is received, the endpoint MUST close the connection | ||
with a QUIC_STREAM_DATA_AFTER_TERMINATION error ({{error-handling}}). | ||
An endpoint that receives a FIN flag or a RST_STREAM frame knows the final | ||
offset for this stream. If a STREAM frame carrying data beyond the received | ||
final offset is received, the endpoint MUST close the connection with a | ||
QUIC_STREAM_DATA_AFTER_TERMINATION error ({{error-handling}}). | ||
|
||
An endpoint MUST close the connection with a QUIC_STREAM_DATA_AFTER_TERMINATION | ||
error if it receives a RST_STREAM frame or a FIN flag with a lower final offset | ||
than the highest data offset it already received on that stream. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be simplified greatly: If a STREAM frame carries data with an offset higher than the final offset, {{ERROR}}. If a RST_STREAM or a STREAM frame marked with a FIN flag indicates a different final offset, {{ERROR}}. |
||
|
||
An endpoint that receives a RST_STREAM frame (and which has not sent a FIN or a | ||
RST_STREAM) MUST immediately respond with a RST_STREAM frame, and MUST NOT send | ||
any more data on the stream. This endpoint may continue receiving frames for | ||
the stream on which a RST_STREAM is received. | ||
|
||
If this state is reached as a result of sending a RST_STREAM frame, the peer | ||
that receives the RST_STREAM might have already sent -- or enqueued for sending | ||
-- frames on the stream that cannot be withdrawn. An endpoint MUST ignore | ||
frames that it receives on closed streams after it has sent a RST_STREAM frame. | ||
An endpoint MAY choose to limit the period over which it ignores frames and | ||
treat frames that arrive after this time as being in error. | ||
that receives the RST_STREAM frame might have already sent -- or enqueued for | ||
sending -- frames on the stream that cannot be withdrawn. An endpoint MUST | ||
ignore frames that it receives on closed streams after it has sent a RST_STREAM | ||
frame. An endpoint MAY choose to limit the period over which it ignores frames | ||
and treat frames that arrive after this time as being in error. | ||
|
||
STREAM frames received after sending RST_STREAM are counted toward the | ||
connection and stream flow-control windows. Even though these frames might be | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally (and YMMV) I find the new wording here a bit confusing, and I'd keep the previous one for this case (with your addition in the next paragraph).