@@ -105,7 +105,7 @@ var reqWriteExcludeHeader = map[string]bool{
105
105
// documentation for Request.Write and RoundTripper.
106
106
type Request struct {
107
107
// Method specifies the HTTP method (GET, POST, PUT, etc.).
108
- // For client requests an empty string means GET.
108
+ // For client requests, an empty string means GET.
109
109
//
110
110
// Go's HTTP client does not support sending a request with
111
111
// the CONNECT method. See the documentation on Transport for
@@ -115,7 +115,7 @@ type Request struct {
115
115
// URL specifies either the URI being requested (for server
116
116
// requests) or the URL to access (for client requests).
117
117
//
118
- // For server requests the URL is parsed from the URI
118
+ // For server requests, the URL is parsed from the URI
119
119
// supplied on the Request-Line as stored in RequestURI. For
120
120
// most requests, fields other than Path and RawQuery will be
121
121
// empty. (See RFC 7230, Section 5.3)
@@ -128,7 +128,7 @@ type Request struct {
128
128
129
129
// The protocol version for incoming server requests.
130
130
//
131
- // For client requests these fields are ignored. The HTTP
131
+ // For client requests, these fields are ignored. The HTTP
132
132
// client code always uses either HTTP/1.1 or HTTP/2.
133
133
// See the docs on Transport for details.
134
134
Proto string // "HTTP/1.0"
@@ -170,11 +170,11 @@ type Request struct {
170
170
171
171
// Body is the request's body.
172
172
//
173
- // For client requests a nil body means the request has no
173
+ // For client requests, a nil body means the request has no
174
174
// body, such as a GET request. The HTTP Client's Transport
175
175
// is responsible for calling the Close method.
176
176
//
177
- // For server requests the Request Body is always non-nil
177
+ // For server requests, the Request Body is always non-nil
178
178
// but will return EOF immediately when no body is present.
179
179
// The Server will close the request body. The ServeHTTP
180
180
// Handler does not need to.
@@ -185,13 +185,14 @@ type Request struct {
185
185
// reading the body more than once. Use of GetBody still
186
186
// requires setting Body.
187
187
//
188
- // For server requests it is unused.
188
+ // For server requests, it is unused.
189
189
GetBody func () (io.ReadCloser , error )
190
190
191
191
// ContentLength records the length of the associated content.
192
192
// The value -1 indicates that the length is unknown.
193
193
// Values >= 0 indicate that the given number of bytes may
194
194
// be read from Body.
195
+ //
195
196
// For client requests, a value of 0 with a non-nil Body is
196
197
// also treated as unknown.
197
198
ContentLength int64
@@ -215,7 +216,7 @@ type Request struct {
215
216
// Transport.DisableKeepAlives were set.
216
217
Close bool
217
218
218
- // For server requests Host specifies the host on which the URL
219
+ // For server requests, Host specifies the host on which the URL
219
220
// is sought. Per RFC 7230, section 5.4, this is either the value
220
221
// of the "Host" header or the host name given in the URL itself.
221
222
// It may be of the form "host:port". For international domain
@@ -228,7 +229,7 @@ type Request struct {
228
229
// ServeMux supports patterns registered to particular host
229
230
// names and thus protects its registered Handlers.
230
231
//
231
- // For client requests Host optionally overrides the Host
232
+ // For client requests, Host optionally overrides the Host
232
233
// header to send. If empty, the Request.Write method uses
233
234
// the value of URL.Host. Host may contain an international
234
235
// domain name.
@@ -255,14 +256,14 @@ type Request struct {
255
256
// Trailer specifies additional headers that are sent after the request
256
257
// body.
257
258
//
258
- // For server requests the Trailer map initially contains only the
259
+ // For server requests, the Trailer map initially contains only the
259
260
// trailer keys, with nil values. (The client declares which trailers it
260
261
// will later send.) While the handler is reading from Body, it must
261
262
// not reference Trailer. After reading from Body returns EOF, Trailer
262
263
// can be read again and will contain non-nil values, if they were sent
263
264
// by the client.
264
265
//
265
- // For client requests Trailer must be initialized to a map containing
266
+ // For client requests, Trailer must be initialized to a map containing
266
267
// the trailer keys to later send. The values may be nil or their final
267
268
// values. The ContentLength must be 0 or -1, to send a chunked request.
268
269
// After the HTTP request is sent the map values can be updated while
0 commit comments