Skip to content

Commit

Permalink
http: fix WriteProxy documentation
Browse files Browse the repository at this point in the history
Fixes #2258

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5016048
  • Loading branch information
bradfitz committed Sep 15, 2011
1 parent 6430f46 commit 7233dcd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pkg/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 7233dcd

Please sign in to comment.