-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
by temotor:
What steps will reproduce the problem? req := new(http.Request) req.URL = http.ParseURL("http://localhost/";) req.ProtoMajor, req.ProtoMinor = 1, 0 // debug dump, _ := http.DumpRequest(req, true) print(string(dump)) What is the expected output? GET / HTTP/1.0 ... What do you see instead? GET / HTTP/1.1 ... What is your $GOOS? $GOARCH? linux amd64 Which revision are you using? (hg identify) 5af6f6656531 tip Please provide any additional information below. The problem is clearly in src/pkg/http/request.go here's code: fmt.Fprintf(w, "%s %s HTTP/1.1\r\n", valueOrDefault(req.Method, "GET"), uri) and although function comment explicitly states that request will be HTTP/1.1: // Write writes an HTTP/1.1 request -- header and body -- in wire format. i reckon that all request fields should be respected, including Proto*.