Support listening on file descriptors#380
Merged
Merged
Conversation
mholt
previously approved these changes
May 5, 2026
mholt
reviewed
May 5, 2026
f8274fa to
eb78b10
Compare
eb78b10 to
83be062
Compare
Contributor
Author
|
Whoops, missed pushing some of my changes to the tests, let's see if they pass now. (They've always passed locally, it's only in GitHub Actions where they're failing) |
mholt
approved these changes
May 7, 2026
Member
mholt
left a comment
There was a problem hiding this comment.
Ha, I know how that goes. Thanks!
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.
Fixes caddyserver/caddy#7525.
I've tested this with the following
Caddyfile{ debug servers { trace } acme_ca https://acme-staging-v02.api.letsencrypt.org/directory auto_https disable_redirects default_bind fd/4 { protocols h1 h2 } } http:// { bind fd/3 redir https://{host}{uri} permanent } testing.958386.xyz { # Replace with your own domain log { level DEBUG format console } respond "Hello, world!" }by running the following command:
I confirmed that
I've only tested this on Linux x86_64, but other platforms should hopefully be fine. The
Dupcode is fairly ugly, and I'm not 100% sure if it's necessary or not, but I know that closing someone else's file descriptors is a bad idea, so I added it just to be safe.