Skip to content

Fixed OutgoingMessage so that it inherits from stream.Writable instead of stream

Rodrigo Muino Tomonari requested to merge github/fork/zeazad-hub/main into main

http: fixed OutgoingMessage so that it inherits from stream.Writable instead of stream

http.OutgoingMessage is supposed to be an instance of stream.Writable, so I set the prototype of OutgoingMessage equal to the Writable prototype and I called the Writable consrtuctor at the end of the constructor for OutgoingMessage. I made sure to override any methods and prpoperties in Writable that were already defined in OutgoingMessage in order to not interfere with the current behavior of OutgoingMessage. Note that I have recently been told that this change does lead to performance issues with http.OutgoingMessage.

Fixes: https://github.com/nodejs/node/issues/44188

Merge request reports

Loading