Skip to content
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

reverseproxy: Support 1xx status codes (HTTP early hints) #4882

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

dunglas
Copy link
Collaborator

@dunglas dunglas commented Jul 12, 2022

Fixes #4860.
Backport of golang/go#53164

@mholt mholt added this to the v2.5.3 milestone Jul 12, 2022
@francislavoie francislavoie changed the title feat(reverseproxy): add support for 1xx status codes reverseproxy: add support for 1xx status codes Jul 12, 2022
@francislavoie francislavoie added the feature ⚙️ New feature or request label Jul 12, 2022
@mholt mholt requested a review from francislavoie July 13, 2022 03:47
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

I have not tested this myself, but the change is sound IMO. I am excited to merge this so that people can start testing it more easily (they will need Go 1.19 obviously).

We just tagged a release today so this should give a fair amount of time for bleeding-edge users to try it out before the next release.

Thank you for the excellent help/support and implementation, @dunglas !

@mholt mholt changed the title reverseproxy: add support for 1xx status codes reverseproxy: add support for 1xx status codes (HTTP early hints) Jul 13, 2022
@mholt mholt changed the title reverseproxy: add support for 1xx status codes (HTTP early hints) reverseproxy: Support 1xx status codes (HTTP early hints) Jul 13, 2022
@dunglas
Copy link
Collaborator Author

dunglas commented Aug 8, 2022

This should be ready now that Caddy supports Go 1.19 (#4925).

func init() {
supports1xx = !regexp.MustCompile(`^go1\.1(?:7|8)\.`).Match([]byte(runtime.Version()))
Copy link
Member

Choose a reason for hiding this comment

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

Could this be simplified to just match Go 1.18, since that's our minimum now?

@mholt
Copy link
Member

mholt commented Aug 8, 2022

Cool. I was waiting for a sponsor to test this out in their company, but they seem to have been delayed somewhat. I'm good with merging this whenever. I haven't had a chance to do my own testing of this but I assume it works given the history here.

@subhashchy
Copy link

hey Matt,

The setup works perfectly. good to go. Thanks for the making this quick.

Took us a while to implement the necessary changes like Caching html link tags etc to fully utilise this new header.

Thanks @dunglas

I will share the results soon.

@mholt
Copy link
Member

mholt commented Aug 9, 2022

That's awesome!! Thanks for testing it!

@mholt mholt merged commit 085df25 into caddyserver:master Aug 9, 2022
@dunglas dunglas deleted the feat/1xx branch August 10, 2022 17:58
WilczynskiT pushed a commit to WilczynskiT/caddy that referenced this pull request Aug 17, 2022
@mholt mholt modified the milestones: v2.6.0-beta.1, v2.6.0 Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add HTTP 103 Early Hints support
4 participants