We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This appears to be a regression from #4558, setting max_size causes a 502 error with this configuration when a large file is uploaded:
http:// { request_body { max_size 20MB } handle_path /api/* { reverse_proxy api:80 } }
I'm using Caddy 2.6.4 (from Docker Hub).
Log entry:
{ "level": "error", "ts": 1690267490.8453255, "logger": "http.log.error", "msg": "readfrom tcp 172.120.4.5:53858->172.120.4.3:80: {id=tzchyd2sh} requestbody.errorWrapper.Read (requestbody.go:63): HTTP 413: http: request body too large", "request": { "remote_ip": "172.120.4.1", "remote_port": "43776", "proto": "HTTP/1.1", "method": "POST", "host": "localhost:1080", "uri": "/api/upload/", "headers": { "Referer": [ "http://localhost:1080/test" ], "Sec-Fetch-Dest": [ "empty" ], "Accept-Encoding": [ "gzip, deflate, br" ], "Sec-Fetch-Site": [ "same-origin" ], "Dnt": [ "1" ], "Accept": [ "*/*" ], "Content-Type": [ "multipart/form-data; boundary=---------------------------26304888236811446562077596232" ], "User-Agent": [ "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0" ], "Content-Length": [ "24670389" ], "Cookie": [], "Sec-Fetch-Mode": [ "cors" ], "Origin": [ "http://localhost:1080" ], "Connection": [ "keep-alive" ], "Pragma": [ "no-cache" ], "Accept-Language": [ "de-DE,de;q=0.8,en-US;q=0.5,en;q=0.3" ], "Cache-Control": [ "no-cache" ] } }, "duration": 0.060551495, "status": 502, "err_id": "nt27mkz4e", "err_trace": "reverseproxy.statusError (reverseproxy.go:1299)" }
The text was updated successfully, but these errors were encountered:
(Deleted my previous comment as I was mobile at the time and didn't see the full log)
Sorry, something went wrong.
18c309b
Thanks for the report! In my experiments, the patch above fixed it. Feel free to verify if you please 😃
My config file:
:8080 { request_body { max_size 10 } reverse_proxy localhost:1234 } :1234 { respond {http.request.body} }
mholt
No branches or pull requests
This appears to be a regression from #4558, setting max_size causes a 502 error with this configuration when a large file is uploaded:
I'm using Caddy 2.6.4 (from Docker Hub).
Log entry:
The text was updated successfully, but these errors were encountered: