Skip to content

caddyhttp: demote Alt-Svc ErrNoAltSvcPort to debug level - #8000

Merged
francislavoie merged 1 commit into
caddyserver:masterfrom
jum:alt-svc
Sep 8, 2026
Merged

francislavoie merged 1 commit into
caddyserver:masterfrom
jum:alt-svc

Conversation

@jum

@jum jum commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

When HTTP/3 is enabled, ServeListener runs in a background goroutine. If early HTTP/1 or HTTP/2 requests arrive before that goroutine registers the listener with quic-go, SetQUICHeaders returns http3.ErrNoAltSvcPort.

Because Alt-Svc is an opportunistic advertisement header and this startup window is transient, log
ErrNoAltSvcPort at debug level instead of error level to avoid spurious error logs during startup and reloads.

Assistance Disclosure

I used Gemini to find the source of the problem and devise a fix. I verified the code and tested it in production.

When HTTP/3 is enabled, ServeListener runs in a background
goroutine.  If early HTTP/1 or HTTP/2 requests arrive before that
goroutine registers the listener with quic-go, SetQUICHeaders
returns http3.ErrNoAltSvcPort.

Because Alt-Svc is an opportunistic advertisement header
and this startup window is transient, log
ErrNoAltSvcPort at debug level instead of error level to
avoid spurious error logs during startup and reloads.
@francislavoie francislavoie added the bug 🐞 Something isn't working label Sep 7, 2026
@francislavoie francislavoie added this to the v2.11.5 milestone Sep 7, 2026
@francislavoie
francislavoie enabled auto-merge (squash) September 7, 2026 21:05
@francislavoie
francislavoie merged commit c8f0667 into caddyserver:master Sep 8, 2026
27 checks passed
@jum
jum deleted the alt-svc branch September 8, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants