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
when we receive a CONNECT request, we should open a tcp connection to the target server identified in the :authority..and response to sender an 2XX, then pipe client connection and target server connection..
But in current h2: we can't response sender with and only with 2xx code, WriteHeader(code int) alway take content-length and other headers in and it causes some problems( http://httpwg.org/specs/rfc7231.html#CONNECT) and let client don't send any more data
Except that, h2-server always send 2xx and some headers to client after http.Handler finish its execution..and how can we forbidden this? because in 'proxy' situation, data will be exchanged between client and proxied server, proxy should not generate a 'response' by itself...(except previous response 2xx code to client)
Is there a recommend way to send client only one HeaderFrame with :status: 200 and forbidden 'after handle done response(just like http1.x w.conn.hijacked())'?
The text was updated successfully, but these errors were encountered:
You can use http.Flusher to write out a 200 response, and then you can bidirectional stream the request body and write the response body (with Flusher again).
This is a dup of #13717. In particular, see the comment #13444 (comment) that's linked from there.
Uh oh!
There was an error while loading. Please reload this page.
As h2 spec : http://httpwg.org/specs/rfc7231.html#CONNECT
when we receive a CONNECT request, we should open a tcp connection to the target server identified in the :authority..and response to sender an 2XX, then pipe client connection and target server connection..
But in current h2: we can't response sender with and only with 2xx code,
WriteHeader(code int)
alway take content-length and other headers in and it causes some problems( http://httpwg.org/specs/rfc7231.html#CONNECT) and let client don't send any more dataExcept that, h2-server always send 2xx and some headers to client after
http.Handler
finish its execution..and how can we forbidden this? because in 'proxy' situation, data will be exchanged between client and proxied server, proxy should not generate a 'response' by itself...(except previous response 2xx code to client)Is there a recommend way to send client only one
HeaderFrame
with:status: 200
and forbidden 'after handle done response(just like http1.xw.conn.hijacked()
)'?The text was updated successfully, but these errors were encountered: