diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2011-09-15 10:28:55 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2011-09-15 10:28:55 -0700 |
| commit | 7233dcde99be500316017d8bc34ec2f3bb325d61 (patch) | |
| tree | 600c965daebd253e832d811bfa8ecdef27b4a362 /src/pkg/http | |
| parent | 6430f46e4bc7fee3c2e9f5ce77618b9ca07a8e15 (diff) | |
| download | go-7233dcde99be500316017d8bc34ec2f3bb325d61.tar.xz | |
http: fix WriteProxy documentation
Fixes #2258
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5016048
Diffstat (limited to 'src/pkg/http')
| -rw-r--r-- | src/pkg/http/request.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pkg/http/request.go b/src/pkg/http/request.go index 6102231392..92a17c268a 100644 --- a/src/pkg/http/request.go +++ b/src/pkg/http/request.go @@ -273,10 +273,12 @@ func (req *Request) Write(w io.Writer) os.Error { } // WriteProxy is like Write but writes the request in the form -// expected by an HTTP proxy. It includes the scheme and host -// name in the URI instead of using a separate Host: header line. -// If req.RawURL is non-empty, WriteProxy uses it unchanged -// instead of URL but still omits the Host: header. +// expected by an HTTP proxy. In particular, WriteProxy writes the +// initial Request-URI line of the request with an absolute URI, per +// section 5.1.2 of RFC 2616, including the scheme and host. If +// 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 { return req.write(w, true) } |
