diff --git a/readme.md b/readme.md index 79ba30e..0811138 100644 --- a/readme.md +++ b/readme.md @@ -40,7 +40,7 @@ gomitmproxy gomitmproxy -m ``` -![fetch http](https://raw.githubusercontent.com/sheepbao/gomitmproxy/master/src/doc/goproxy.png) +![fetch http](https://raw.githubusercontent.com/sheepbao/gomitmproxy/master/doc/goproxy.png) 加 -m 参数,表示抓取http请求和响应 @@ -59,7 +59,7 @@ gomitmproxy -m ``` 然后浏览器设置代理,ip为localhost,端口为8080,即可实现科学上网 -![proxy](https://raw.githubusercontent.com/sheepbao/gomitmproxy/master/src/doc/proxy.png) +![proxy](https://raw.githubusercontent.com/sheepbao/gomitmproxy/master/doc/proxy.png) ## 最后 diff --git a/src/vendor/mitm/mitm.go b/src/vendor/mitm/mitm.go index e4209c2..fcc4896 100644 --- a/src/vendor/mitm/mitm.go +++ b/src/vendor/mitm/mitm.go @@ -269,7 +269,8 @@ func (hw *HandlerWrapper) Forward(resp http.ResponseWriter, req *http.Request, r if req.Method == "CONNECT" { b := []byte("HTTP/1.1 200 Connection Established\r\n" + - "Proxy-Agent: gomitmproxy/" + Version + "\r\n\r\n") + "Proxy-Agent: gomitmproxy/" + Version + "\r\n" + + "Content-Length: 0" + "\r\n\r\n") _, err := connIn.Write(b) if err != nil { mylog.Println("Write Connect err:", err)