caddy: reverse_proxy hangs on wrong URL in browsers
1. Environment
1a. Operating system and version
Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-122-generic x86_64)
1b. Caddy version (run caddy version or paste commit SHA)
2.6.2
1c. Go version (if building Caddy from source; run go version)
1.18.7
2. Description
This request hangs forever (why doesn’t any timeout help?):
https://keystonenetwork.localhost/sito/wp-includes/wlwmanifest.xml
Caddyfile:
{
log {
level DEBUG
}
}
https://keystonenetwork.localhost {
@webflow {
path_regexp ^/(|contacts|blog)($|\?|/)
}
handle @webflow {
reverse_proxy {
header_up host {http.reverse_proxy.upstream.host}
to http://keystoneinvestors.webflow.io
transport http {
dial_timeout 2s
response_header_timeout 60s
}
}
}
handle {
reverse_proxy {
header_up host www.keystonenetwork.com
transport http {
tls_server_name www.keystonenetwork.com
dial_timeout 2s
tls_timeout 5s
response_header_timeout 60s
read_timeout 60s
write_timeout 60s
}
to https://35.208.143.249
}
}
}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (23 by maintainers)
If you have a way to repro a curl problem, I will certainly be interested in knowing exactly how so that we can fix it!
Okie dokie, I took a few minutes to try this out. And it works fine in my browser (which uses HTTP/2 and HTTP/3):
Curl also works.
So, I’m not entirely sure what the problem is, but I don’t think it’s in Caddy? Maybe something in your network is dropping or modifying packets.
@mholt, I built curl with http/3 support and got something interesting.
Run:
curl3 --http3 -v "https://keystonenetwork.localhost/sito/wp-includes/wlwmanifest.xml"output:
Caddy’s log:
curl version
Caddy’s log when a request hangs in browser:
@mholt, but with curl this bug doesn’t reproduce. I have this problem only in browser (Brave 1.45.118 Chromium: 107.0.5304.91). I think, the problem is with http/2 or http/3 only. I ready to provide more info if needed. But which info will be really helpful?
Thanks for opening an issue! We’ll look into this.
It’s not immediately clear to me what is going on, so I’ll need your help to understand it better. Specifically, logs and a relevant
curl -vcommand with its output.Ideally, we need to be able to reproduce the bug in the most minimal way possible. This allows us to write regression tests to verify the fix is working. If we can’t reproduce it, then you’ll have to test our changes for us until it’s fixed – and then we can’t add test cases, either.
I’ve attached a template below that will help make this easier and faster! This will require some effort on your part – please understand that we will be dedicating time to fix the bug you are reporting if you can just help us understand it and reproduce it easily.
This template will ask for some information you’ve already provided; that’s OK, just fill it out the best you can. 👍 I’ve also included some helpful tips below the template. Feel free to let me know if you have any questions!
Thank you again for your report, we look forward to resolving it!
Template
Instructions – please heed otherwise we cannot help you (help us help you!)
Environment: Please fill out your OS and Caddy versions, even if you don’t think they are relevant. (They are always relevant.) If you built Caddy from source, provide the commit SHA and specify your exact Go version.
Description: Describe at a high level what the bug is. What happens? Why is it a bug? Not all bugs are obvious, so convince readers that it’s actually a bug.
Tutorial: What are the minimum required specific steps someone needs to take in order to experience the same bug? Your goal here is to make sure that anyone else can have the same experience with the bug as you do. You are writing a tutorial, so make sure to carry it out yourself before posting it. Please:
curl.Example of a tutorial: