mirror of https://github.com/nodejs/node.git
doc: fix typos in http.markdown
PR-URL: https://github.com/joyent/node/pull/4784 Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>pull/1/head
parent
0fef250090
commit
adc0206de9
|
@ -155,7 +155,7 @@ sent to the server on that socket.
|
||||||
|
|
||||||
`function (exception, socket) { }`
|
`function (exception, socket) { }`
|
||||||
|
|
||||||
If a client connection emits an 'error' event - it will forwarded here.
|
If a client connection emits an 'error' event, it will be forwarded here.
|
||||||
|
|
||||||
`socket` is the `net.Socket` object that the error originated from.
|
`socket` is the `net.Socket` object that the error originated from.
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ be called before [response.end()][] is called.
|
||||||
If you call [response.write()][] or [response.end()][] before calling this, the
|
If you call [response.write()][] or [response.end()][] before calling this, the
|
||||||
implicit/mutable headers will be calculated and call this function for you.
|
implicit/mutable headers will be calculated and call this function for you.
|
||||||
|
|
||||||
Note: that Content-Length is given in bytes not characters. The above example
|
Note that Content-Length is given in bytes not characters. The above example
|
||||||
works because the string `'hello world'` contains only single byte characters.
|
works because the string `'hello world'` contains only single byte characters.
|
||||||
If the body contains higher coded characters then `Buffer.byteLength()`
|
If the body contains higher coded characters then `Buffer.byteLength()`
|
||||||
should be used to determine the number of bytes in a given encoding.
|
should be used to determine the number of bytes in a given encoding.
|
||||||
|
@ -412,7 +412,7 @@ first chunk of body.
|
||||||
|
|
||||||
Returns `true` if the entire data was flushed successfully to the kernel
|
Returns `true` if the entire data was flushed successfully to the kernel
|
||||||
buffer. Returns `false` if all or part of the data was queued in user memory.
|
buffer. Returns `false` if all or part of the data was queued in user memory.
|
||||||
`'drain'` will be emitted when the buffer is again free.
|
`'drain'` will be emitted when the buffer is free again.
|
||||||
|
|
||||||
### response.addTrailers(headers)
|
### response.addTrailers(headers)
|
||||||
|
|
||||||
|
@ -921,7 +921,7 @@ following additional events, methods, and properties.
|
||||||
|
|
||||||
`function () { }`
|
`function () { }`
|
||||||
|
|
||||||
Indicates that the underlaying connection was closed.
|
Indicates that the underlying connection was closed.
|
||||||
Just like `'end'`, this event occurs only once per response.
|
Just like `'end'`, this event occurs only once per response.
|
||||||
|
|
||||||
### message.httpVersion
|
### message.httpVersion
|
||||||
|
|
Loading…
Reference in New Issue