Add rudimentary support for 103 responses#550
Merged
Conversation
Member
Author
Current behaviorClient outputServer outputNew behaviorClient outputServer outputNote: This guest is returning two 103 responses before the 200. You can see the response headers include (style1, script1.js) and (style2, script2.js) to distinguish the responses. This is not duplication of messages, responses, or headers. |
95e11e8 to
020b8c2
Compare
ulyssa
approved these changes
Nov 7, 2025
joeshaw
reviewed
Nov 18, 2025
| }; | ||
|
|
||
| viceroy_test!(early_hints, |is_component| { | ||
| let resp = Test::using_fixture("env-vars.wasm") |
Member
There was a problem hiding this comment.
Noticed this after the fact, not sure if it was intentional. Should this be early-hints.wasm instead? It panics if I just switch it, but I didn't debug things further. If not, a comment here would be good.
Member
Author
There was a problem hiding this comment.
You’re right. I’ll get that fixed.
thanks for catching it.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds minimal support for 103 responses.
Currently, the version of hyper we use does not support 103s, which prior to now would cause hyper to return an error.
This change will catch, log, and drop 103s so that they are displayed in the output, but will not be sent down to hyper, and thus to the client. The end result is that guests can test their 103 support, and see that the 103s were generated and transmitted out of the guest. But they will be elided from the response stream sent back to the client. The client will receive the final response.
This allows users to continue to use Viceroy in their testing pipeline to ensure that the stack is working. They will be able to assert the status of the final response, but not the existence of the 103 frames. This ensures that Viceroy is not outright broken when presented with 103s, but it does not yet provide full 103 support.
Adding full 103 support would require adding support to hyper (and h2, on which hyper depends), but that's not as straightforward as we would like. This is also complicated by the fact that we're pinned to hyper 0.14, while hyper main is 1.6 (as of this writing).