Skip to content

Commit

Permalink
Use r.Write() in place of r.WriteProxy() for CONNECT
Browse files Browse the repository at this point in the history
  • Loading branch information
williambailey committed Jul 13, 2017
1 parent f14b427 commit 4df067b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxyhttphandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ func (h *proxyHTTPHandler) doConnectProxy(w http.ResponseWriter, r *http.Request
}
defer serverConn.Close()
removeProxyHeaders(r)
r.WriteProxy(serverConn)
//r.WriteProxy(serverConn)
r.Write(serverConn) // instead of WriteProxy as this will *hopefully* deal with CONNECT correctly.
}
hj, ok := w.(http.Hijacker)
if !ok {
Expand Down

0 comments on commit 4df067b

Please sign in to comment.