Do not read response body for HEAD requests
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
parent
ad99c5bbea
commit
0528c054a6
3 changed files with 46 additions and 6 deletions
|
@ -284,8 +284,9 @@ func (p *ReverseProxy) roundTrip(rw http.ResponseWriter, req *http.Request, outR
|
|||
|
||||
// Sending the responseWriter unlocks the connection readLoop, to handle the response.
|
||||
co.RWCh <- rwWithUpgrade{
|
||||
RW: rw,
|
||||
Upgrade: upgradeResponseHandler(req.Context(), reqUpType),
|
||||
ReqMethod: req.Method,
|
||||
RW: rw,
|
||||
Upgrade: upgradeResponseHandler(req.Context(), reqUpType),
|
||||
}
|
||||
|
||||
if err := <-co.ErrCh; err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue