We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run this program on local.
package main import ( "fmt" "net/http" "net/http/httputil" ) func do(w http.ResponseWriter, req *http.Request) { b, _ := httputil.DumpRequest(req, false) fmt.Println(string(b)) } func main() { http.HandleFunc("/", do) http.ListenAndServe(":12306", nil) }
on another terminal, run:
curl -v 'http://www.qiniu.com/' -x 'http://localhost:12306' * Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 12306 (#0) > GET http://www.qiniu.com/ HTTP/1.1 > User-Agent: curl/7.37.1 > Host: www.qiniu.com > Accept: */* > Proxy-Connection: Keep-Alive > < HTTP/1.1 200 OK < Date: Tue, 19 May 2015 08:55:41 GMT < Content-Length: 0 < Content-Type: text/plain; charset=utf-8 < * Connection #0 to host localhost left intact
I ran sudo tcpdump -i any -A port 12306 and it prints
sudo tcpdump -i any -A port 12306
GET http://www.qiniu.com/ HTTP/1.1 User-Agent: curl/7.37.1 Host: www.qiniu.com Accept: */* Proxy-Connection: Keep-Alive
GET / HTTP/1.1 Host: www.qiniu.com Accept: */* Proxy-Connection: Keep-Alive User-Agent: curl/7.37.1
The text was updated successfully, but these errors were encountered:
CC @bradfitz
Sorry, something went wrong.
CL https://golang.org/cl/17592 mentions this issue.
9b1068a
No branches or pull requests
go version go1.4.2 darwin/amd64
darwin/amd64
run this program on local.
on another terminal, run:
I ran
sudo tcpdump -i any -A port 12306
and it printsThe text was updated successfully, but these errors were encountered: