feat: add opt-in h2c support for the http checker#473
Merged
atkrad merged 1 commit intowait4x:mainfrom Oct 20, 2025
mridang:feat/http-h2c-support
Merged
feat: add opt-in h2c support for the http checker#473atkrad merged 1 commit intowait4x:mainfrom mridang:feat/http-h2c-support
atkrad merged 1 commit intowait4x:mainfrom
mridang:feat/http-h2c-support
Conversation
- Add `WithH2C(bool)` option to enable HTTP/2 cleartext (h2c) for `http://` URLs
- Use `http2.Transport{AllowHTTP: true}` when h2c is enabled, scheme is `http`,
no proxy is configured for the target URL, and `--no-redirect` is set
- Keep default behavior unchanged (h2 over TLS via ALPN; HTTP remains HTTP/1.1)
- Add `--h2c` flag to the `http` command to expose the option via CLI
- Add unit tests for h2c at checker level and CLI level
Rationale:
- Some services expose HTTP/2 over cleartext (h2c) for local/dev or sidecar endpoints.
- This makes Wait4X compatible with those endpoints without impacting existing users.
Notes:
- h2c is intentionally opt-in to avoid proxy/redirect edge cases.
- If an HTTP proxy is configured, the client falls back to the standard transport.
Contributor
Author
|
Hi @atkrad, thanks for the prompt action on this. Here is some additional context zitadel/zitadel-charts#463 It would be great to get this out. 🙏🏻 |
atkrad
approved these changes
Oct 20, 2025
Member
|
Hi @mridang, Thanks for the contribution. |
Member
|
@mridang I’ll let you know here as soon as it’s released. |
Member
Closed
11 tasks
11 tasks
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 PR enables optional h2c for
http://URLs while keeping current behavior unchanged by default.What’s included
WithH2C(bool)option and--h2cflag to opt into h2c.http2.Transport{AllowHTTP:true}for cleartext HTTP only when:http,--no-redirectis set (avoids cross-scheme redirect issues).Why