Skip to content

Conversation

@jackkleeman
Copy link

@jackkleeman jackkleeman commented Dec 3, 2025

Go http servers do support fully bidirectional http1.1 (ie you can start streaming back a response body while the request body is still streaming) as long as EnableFullDuplex is called. Some services downstream of the interceptor (eg, restate services) may rely on this functionality, so by enabling this in our http server we enable those kinds of services. We will not fail if the option can't be enabled, but we will log. However it works with the current stdlb and there is no reason to expect that to change!

Checklist

@snyk-io
Copy link

snyk-io bot commented Dec 3, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Signed-off-by: Jack Kleeman <jackkleeman@gmail.com>
Copy link
Contributor

@linkvt linkvt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it locally and can confirm that the change works as expected 👍

Only thing that comes to my mind is that a test is missing to prevent regressions in the future, it's hard to test though and maybe not that critical as it's not a major requirement?

@jackkleeman
Copy link
Author

We could test that the enable flag doesn't return an error, for a default server? Beyond that we'd be testing the behavior of the go stdlib, which probably isn't worth it

@jackkleeman jackkleeman requested a review from linkvt December 4, 2025 14:01
@linkvt
Copy link
Contributor

linkvt commented Dec 4, 2025

Yeah I agree that testing go internals and testing that we call it don't make much sense - I think it was cleaner without the tests 😀 . I was thinking about some kind of e2e test but thats probably a bit harder to do and maybe not required/worth it.

I'm also just reviewing because I'm interested so my judgement isn't worth much as it's up to the reviewers to decide.

@jackkleeman
Copy link
Author

i think its good to test that responsewriter correctly passes through the command, and we already have tests for hijacker for the same thing. the one on servecontext i dont mind so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants