diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 827bba62631..8b32cf59f4b 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -155,7 +155,7 @@ sent to the server on that 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. @@ -295,7 +295,7 @@ be called before [response.end()][] is called. If you call [response.write()][] or [response.end()][] before calling this, the 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. If the body contains higher coded characters then `Buffer.byteLength()` 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 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) @@ -921,7 +921,7 @@ following additional events, methods, and properties. `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. ### message.httpVersion