-
Notifications
You must be signed in to change notification settings - Fork 24
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. |
This issue looks exactly like my previous issue #104 Which version of souin are you using? |
Hi @imlonghao, I'm on 0.15.0 of cache-handler; does that pull in the right Souin version to include your fix?
|
I tried your build command with my previous example, works well in my cases.
I don't mean to be offense, but how did you manage your image version? |
This container is deployed into production via CI docker builds and pulled onto each host before the docker swarm deploy. Not saying it's impossible something has broken here, just that it's unlikely. When I get a chance I'll manually check the build versions on the running container to double check. |
Can confirm both 0.15.0 of cache-handler and 1.7.5 of souin are running in that container, care of If you're confident there's no other path that can cause this failure @imlonghao, I'll try enabling HEAD caching again in case the container got updated correctly since I last checked. |
@alistairjevans can you run with verbose and paste the logs? Did you find time to work on a reproducible repository? |
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: