Commit 7233dcde authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

http: fix WriteProxy documentation

Fixes #2258

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5016048
parent 6430f46e
...@@ -273,10 +273,12 @@ func (req *Request) Write(w io.Writer) os.Error { ...@@ -273,10 +273,12 @@ func (req *Request) Write(w io.Writer) os.Error {
} }
// WriteProxy is like Write but writes the request in the form // WriteProxy is like Write but writes the request in the form
// expected by an HTTP proxy. It includes the scheme and host // expected by an HTTP proxy. In particular, WriteProxy writes the
// name in the URI instead of using a separate Host: header line. // initial Request-URI line of the request with an absolute URI, per
// If req.RawURL is non-empty, WriteProxy uses it unchanged // section 5.1.2 of RFC 2616, including the scheme and host. If
// instead of URL but still omits the Host: header. // req.RawURL is non-empty, WriteProxy uses it unchanged. In either
// case, WriteProxy also writes a Host header, using either req.Host
// or req.URL.Host.
func (req *Request) WriteProxy(w io.Writer) os.Error { func (req *Request) WriteProxy(w io.Writer) os.Error {
return req.write(w, true) return req.write(w, true)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment