1
0
mirror of https://github.com/golang/go synced 2024-11-22 02:14:40 -07:00

http: corrected comment for Response.GetHeader.

Fixes #622.

R=rsc
CC=golang-dev
https://golang.org/cl/224084
This commit is contained in:
Andrew Gerrand 2010-03-03 08:53:22 +11:00
parent f44fa9b4c7
commit adf1e4c5fd

View File

@ -152,11 +152,10 @@ func (r *Response) AddHeader(key, value string) {
} }
} }
// GetHeader returns the value of the response header with the given // GetHeader returns the value of the response header with the given key.
// key, and true. If there were multiple headers with this key, their // If there were multiple headers with this key, their values are concatenated,
// values are concatenated, with a comma delimiter. If there were no // with a comma delimiter. If there were no response headers with the given
// response headers with the given key, it returns the empty string and // key, GetHeader returns an empty string. Keys are not case sensitive.
// false. Keys are not case sensitive.
func (r *Response) GetHeader(key string) (value string) { func (r *Response) GetHeader(key string) (value string) {
value, _ = r.Header[CanonicalHeaderKey(key)] value, _ = r.Header[CanonicalHeaderKey(key)]
return return