-
Notifications
You must be signed in to change notification settings - Fork 23
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
HEAD Request HTTP/2 content-length error #112
Comments
Hey @alistairjevans thank you for your feedback. Do you have a configuration to reproduce that? I'm trying with the given configuration without any issue.
> curl https://localhost/default --head
HTTP/2 200
alt-svc: h3=":443"; ma=2592000
cache-control:
cache-status: Souin; fwd=uri-miss; stored; key=HEAD-https-localhost-/default
content-type: text/plain; charset=utf-8
server: Caddy
content-length: 12
date: Thu, 14 Nov 2024 20:29:55 GMT
> curl https://localhost/default --head
HTTP/2 200
age: 1
alt-svc: h3=":443"; ma=2592000
cache-control:
cache-status: Souin; hit; ttl=999; key=HEAD-https-localhost-/default; detail=DEFAULT
content-type: text/plain; charset=utf-8
date: Thu, 14 Nov 2024 20:29:55 GMT
server: Caddy
content-length: 12 |
Hi @darkweak; some details adjusted for privacy, but this is basically the config; nothing too complicated:
This is proxying to a Rails app, running on Rack. Interestingly, when I perform a HEAD request directly to our app, I get a content-length header of '0' returned; with a GET this page would return content. Again some details omitted:
Is it related to the 0 content-length response possibly? |
@alistairjevans Thanks, I tries to reproduce but unfortunately it worked well during my tests. I checked more about Rack and RoR (I'm not a RoR dev so that's new to me) and I think that's the streaming response (or something related to RoR/Rack). FYI: I DM'ed you on Twitter/X if you don't want to send some sensitive data here if needed. Thank you for your time for answering to my questions. |
I've seen fairly easily reproducible behaviour with HEAD requests where if caching is enabled on HEAD requests I get a HTTP/2 stream error:
If I turn off HEAD caching with
allowed_http_verbs GET
, requests go through fine.No errors in the caddy logs themselves. Any chance this handler is duplicating content-length headers?
The text was updated successfully, but these errors were encountered: