From 20ab480847490d20cab6225be6db386e8cc9a48d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 8 Jun 2016 16:23:21 -0700 Subject: [PATCH 1/3] doc: add information for IncomingMessage.destroy() Add documentation for `http.IncomingMessage.prototype.destroy()`. Fixes: https://github.com/nodejs/node/issues/4226 --- doc/api/http.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/http.md b/doc/api/http.md index 0b5e75aeabe2cc..e7430cb6545f0d 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -910,6 +910,14 @@ following additional events, methods, and properties. Indicates that the underlying connection was closed. Just like `'end'`, this event occurs only once per response. +### message.destroy(error) + +* `error` {Error} + +Calls `.destroy()` on the socket that received the `IncomingMessage`. If `error` +is provided, an `'error'` event is fired and `error` is passed as an argument to +any listeners on the event. + ### message.headers The request/response headers object. From 9950f3ae90024e8313975540a5ec4341a29f3d3f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 8 Jun 2016 16:27:54 -0700 Subject: [PATCH 2/3] squash: error is optional --- doc/api/http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http.md b/doc/api/http.md index e7430cb6545f0d..cdc03a3c83beac 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -910,7 +910,7 @@ following additional events, methods, and properties. Indicates that the underlying connection was closed. Just like `'end'`, this event occurs only once per response. -### message.destroy(error) +### message.destroy([error]) * `error` {Error} From a8c51924c578b70006fe5a9e589b409bc728754d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 11 Jun 2016 20:10:21 -0700 Subject: [PATCH 3/3] squash:nits --- doc/api/http.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index cdc03a3c83beac..358fdbda9908e7 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -914,9 +914,9 @@ Just like `'end'`, this event occurs only once per response. * `error` {Error} -Calls `.destroy()` on the socket that received the `IncomingMessage`. If `error` -is provided, an `'error'` event is fired and `error` is passed as an argument to -any listeners on the event. +Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` +is provided, an `'error'` event is emitted and `error` is passed as an argument +to any listeners on the event. ### message.headers