You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Are you asking for help with using Caddy? Please use our forum instead: https://forum.caddyserver.com. If you are filing a bug report, please answer the following questions. If your issue is not a bug report, you do not need to use this template. Either way, please consider donating if we've helped you. Thanks!)
1. What version of Caddy are you running (caddy -version)?
I tested the newest master caddy today.
2. What are you trying to do?
I try to test the proxy with POST method and body. When proxying to backend servers with load balance policy, if an error happened such as the backend server doesn't work well caddy would request another backend server.
And I add one log in following location.
res, err := transport.RoundTrip(outreq)
if err != nil {
log.Println("err:", err)
return err
}
While if this failing request is a POST request and whose body has data, the second try would fail either because of the error "http: invalid Read on closed Body" even if the backend server is normal and it should be forwarded successfully in this second try.
(Are you asking for help with using Caddy? Please use our forum instead: https://forum.caddyserver.com. If you are filing a bug report, please answer the following questions. If your issue is not a bug report, you do not need to use this template. Either way, please consider donating if we've helped you. Thanks!)
1. What version of Caddy are you running (
caddy -version
)?I tested the newest master caddy today.
2. What are you trying to do?
I try to test the proxy with POST method and body. When proxying to backend servers with load balance policy, if an error happened such as the backend server doesn't work well caddy would request another backend server.
And I add one log in following location.
res, err := transport.RoundTrip(outreq)
if err != nil {
log.Println("err:", err)
return err
}
While if this failing request is a POST request and whose body has data, the second try would fail either because of the error "http: invalid Read on closed Body" even if the backend server is normal and it should be forwarded successfully in this second try.
3. What is your entire Caddyfile?
PS: 192.168.206.231:9606 workes well while localhost:9608 doesn't exist.
4. How did you run Caddy (give the full command and describe the execution environment)?
OS: win7 x64
go version: go1.7
First I "go install" the source and then cd /bin directory, finally I run the caddy command
5. What did you expect to see?
I expect to see caddy can proxy successfully if I configure several endpoints even if there are some wrong endpoints.
6. What did you see instead (give full error messages and/or log)?
I got the log "err: http: invalid Read on closed Body"
7. How can someone who is starting from scratch reproduce this behavior as minimally as possible?
I have Googled this issue and found an extremely similar one. They have solved this.
flynn/flynn#872
The text was updated successfully, but these errors were encountered: