From d909c289fa51613b4c8b857be83da2ff32f0c9da Mon Sep 17 00:00:00 2001 From: MaleDong Date: Tue, 14 Aug 2018 08:57:24 +0800 Subject: [PATCH 1/2] doc: Fix the `ServerResponse` methods explainations to make it clear Ref: https://github.com/nodejs/node/issues/14146. In short: `ServerResponse` acutally inherits from `OutgoingMessage`, with a series of methods like those in `Stream.Writable`. So we cannot use `implements`(this has made poeple feel puzzled because there are still many methods we don't need or have), so `inherits from Stream` is enough, due to some core reasons and performance told by mcollina from the ref (See some latest discussions at Ref). --- doc/api/http.md | 9 ++++----- doc/api/http2.md | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 0b1340556bb304..69ee43ab895691 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -313,8 +313,8 @@ the data is read it will consume memory that can eventually lead to a Node.js does not check whether Content-Length and the length of the body which has been transmitted are equal or not. -The request implements the [Writable Stream][] interface. This is an -[`EventEmitter`][] with the following events: +The request inherits from [Stream][], and additionally implements the +following: ### Event: 'abort'