Skip to content

Commit 37ebb5c

Browse files
Fix custom Connect response for Connect Request
1 parent e12ef06 commit 37ebb5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

https.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ func createCustomConnectResponse(ctx *ProxyCtx) ([]byte, error) {
362362
if ctx.proxy.ConnectRespHandler == nil {
363363
return nil, nil
364364
}
365-
resp := &http.Response{Status: "200 OK", StatusCode: 200, Proto: "HTTP/1.0", ProtoMajor: 1, ProtoMinor: 0, Header: http.Header{}}
365+
resp := &http.Response{Status: "200 OK", StatusCode: 200, Proto: "HTTP/1.0", ProtoMajor: 1, ProtoMinor: 0, ContentLength: -1, Header: http.Header{}}
366366
err := ctx.proxy.ConnectRespHandler(ctx, resp)
367367
if err != nil {
368368
return nil, err

0 commit comments

Comments
 (0)