Repository navigation
quic: handle application-specific no-error codes - #67094
Conversation
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67094 +/- ##
==========================================
- Coverage 92.62% 90.66% -1.97%
==========================================
Files 432 799 +367
Lines 197476 280284 +82808
Branches 30129 54135 +24006
==========================================
+ Hits 182917 254120 +71203
- Misses 14231 16288 +2057
- Partials 328 9876 +9548
🚀 New features to boost your workflow:
|
pimterry
left a comment
There was a problem hiding this comment.
Onboard with the general concept, code looks good to me, but I think the undefined error code is worth looking at. Even though it's preexisting, this makes it much broader since it now covers all unknown H3 codes - all unknown h3 codes are exposed as undefined instead of their raw values.
Signed-off-by: Efe Karasakal <hi@efe.dev>
a25558d to
d8ceea3
Compare
Commit Queue failedThis pull request has multiple commits, but no landing policy was selected. Add
commit-queue-squash
The pull request was removed from the Commit Queue and labeled
commit-queue-failed
Full Commit Queue output |
|
Landed in 3e797cb |
Signed-off-by: Efe Karasakal <hi@efe.dev> PR-URL: #67094 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com>
This started as a consistency fix between
Session::EmitClose()andStream::EmitClose().Before this change, three places decided whether a QUIC application code meant an error, and they did not agree. Session close only considered code
0clean, so an HTTP/3 peer closing withH3_NO_ERROR(0x100) could rejectsession.closed. Stream handling recognizedH3_NO_ERRORin C++, but JavaScript later treated any non-zero reset code as an error. As a result, a clean HTTP/3 reset could still rejectstream.closedor fail a read.The underlying
QuicErrorconversion also hardcoded HTTP/3 values without knowing which protocol had been selected. This change moves that decision to code that has that information:0as its no-error code.H3_NO_ERRORand unknown or reserved codes as no error, as required by RFC 9114.H3_DATAGRAM_ERROR, remain errors.QuicErrornow preserves the original type and code. Sessions and streams use the selected protocol to interpret them, and JavaScript no longer guesses based on whether the number is zero.AI assistance: I used Codex's assistance for the investigation/PR