diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2015-04-27 18:55:21 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2015-04-28 21:58:58 +0000 |
| commit | 339cf9807debe2b20e8701ff3821079a8e925700 (patch) | |
| tree | 4a73c2d646fcf1af00819120f9a1f8c3b4c46c23 /src/net/http/response.go | |
| parent | ac354ba725c252e988d46a0f616d309f955e26f2 (diff) | |
| download | go-339cf9807debe2b20e8701ff3821079a8e925700.tar.xz | |
net/http: documentation updates
Fixes #10366 (how to set custom headers)
Fixes #9836 (PATCH in PostForm)
Fixes #9276 (generating a server-side Request for testing)
Update #8991 (clarify Response.Write for now; export ReverseProxy's copy later?)
Change-Id: I95a11bf3bb3eeeeb72775b6ebfbc761641addc35
Reviewed-on: https://go-review.googlesource.com/9410
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'src/net/http/response.go')
| -rw-r--r-- | src/net/http/response.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/http/response.go b/src/net/http/response.go index cfe695ce5c..4afecda130 100644 --- a/src/net/http/response.go +++ b/src/net/http/response.go @@ -189,8 +189,10 @@ func (r *Response) ProtoAtLeast(major, minor int) bool { r.ProtoMajor == major && r.ProtoMinor >= minor } -// Writes the response (header, body and trailer) in wire format. This method -// consults the following fields of the response: +// Write writes r to w in the HTTP/1.n server response format, +// including the status line, headers, body, and optional trailer. +// +// This method consults the following fields of the response r: // // StatusCode // ProtoMajor @@ -202,7 +204,7 @@ func (r *Response) ProtoAtLeast(major, minor int) bool { // ContentLength // Header, values for non-canonical keys will have unpredictable behavior // -// Body is closed after it is sent. +// The Response Body is closed after it is sent. func (r *Response) Write(w io.Writer) error { // Status line text := r.Status |
