-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
When I set response body in function Connect, I got this when I run it:
http: superfluous response.WriteHeader call from github.com/ouqiang/goproxy.(*Proxy).httpProxy.func1 (proxy.go:340)
The code I set the response body:
func (e *EventHandler) Connect(ctx *goproxy.Context, rw http.ResponseWriter) {
if ctx.Req.Host == "test.com" {
rw.Header().Set("Content-Type", "text/html; charset=utf-8")
_, _ = rw.Write([]byte("<!doctype html><html><head><title>Hello, World!</title></head><body><h1 style='text-align:center;'>Hello, World!</h1></body></html>"))
}
}
Metadata
Metadata
Assignees
Labels
No labels