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
I made the simple program to show the problem that I have.
This program has three servers: a frontend, a reverse proxy, and a backend.
After the frontend's HTTP upgrade request is accepted, the backend immediately closes the output stream. But the backend can't read the input stream because of the socket is closed by the reverse proxy.
I think httputil.ReverseProxy doesn't support TCP half-close.
In order to support TCP half-close in ReverseProxy,
ReverseProxy.handleUpgradeResponse should not close all sockets
immediately when the one side gets an EOF. But we should close the
write stream on the socket to inform the transfer is complete.
Fixesgolang#35892
Thank you for this bug report as well as CL and welcome to the Go project @sngchlko!
I've added some feedback to your CL and we are currently in a code freeze until perhaps February 2020, but I look forward to encountering you more here and on the code review list and thank you again!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I made the simple program to show the problem that I have.
This program has three servers: a frontend, a reverse proxy, and a backend.
After the frontend's HTTP upgrade request is accepted, the backend immediately closes the output stream. But the backend can't read the input stream because of the socket is closed by the reverse proxy.
I think
httputil.ReverseProxy
doesn't support TCP half-close.What did you expect to see?
The backend can read the input stream even though the output stream is closed.
backend got Hello
What did you see instead?
But the input stream was closed as well.
backend failed to read line from client: <nil>
The text was updated successfully, but these errors were encountered: