Commit Graph

217 Commits

Author SHA1 Message Date
Aviv Keller
574f2dd517
lib: prefer optional chaining
PR-URL: https://github.com/nodejs/node/pull/55045
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-09-24 19:48:15 +00:00
Antoine du Hamel
cbd2c387ce
http: remove prototype primordials
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/53698
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-07-06 10:33:16 +02:00
Antoine du Hamel
231548b5cf
lib: enforce ASCII order in error code imports
PR-URL: https://github.com/nodejs/node/pull/52625
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-04-23 17:05:38 +00:00
Antoine du Hamel
a596af0819
tools: add lint rule to keep primordials in ASCII order
PR-URL: https://github.com/nodejs/node/pull/52592
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-04-21 16:53:08 +00:00
Marco Ippolito
9448c61e08
http: split set-cookie when using setHeaders
PR-URL: https://github.com/nodejs/node/pull/51649
Fixes: https://github.com/nodejs/node/issues/51599
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2024-02-04 17:36:16 +00:00
Arsalan Ahmad
6e90fed8c3
http: handle multi-value content-disposition header
Headers in nodejs can be arrays and current workaround for
content-disposition header do not take this into account.
This change fixes that and makes sure array values are handled
properly.

PR-URL: https://github.com/nodejs/node/pull/50977
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-12-11 08:41:23 +00:00
Aras Abbasi
83e6350b82
errors: improve hideStackFrames
PR-URL: https://github.com/nodejs/node/pull/49990
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 16:25:08 +00:00
Robert Nagy
d68d0eacaa
http: reduce parts in chunked response when corking
Refs: https://github.com/nodejs/performance/issues/57

PR-URL: https://github.com/nodejs/node/pull/50167
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-10-15 12:19:48 +00:00
Matteo Collina
38b82b0604
http: send implicit headers on HEAD with no body
If we respond to a HEAD request with a body, we ignore all writes.
However, we must still include all implicit headers.

Fixes a regressions introduced in
https://github.com/nodejs/node/pull/47732.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/48108
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2023-05-26 12:38:24 +00:00
Gerrard Lindsay
5ec0f39a7a
http: prevent writing to the body when not allowed by HTTP spec
PR-URL: https://github.com/nodejs/node/pull/47732
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-05-13 17:09:26 +00:00
HinataKah0
2fbe124e68
http: add highWaterMark opt in http.createServer
Add highWaterMark option when creating a new HTTP server.
This option will override the default (readable|writable)
highWaterMark values on sockets created.

Fixes: https://github.com/nodejs/node/issues/46606
PR-URL: https://github.com/nodejs/node/pull/47405
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-04-24 05:35:38 +00:00
Robert Nagy
e7b5c0ed47
stream: add setter & getter for default highWaterMark (#46929)
Adds stream.(get|set)DefaultHighWaterMark to read or update
the default hwm.

PR-URL: https://github.com/nodejs/node/pull/46929
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
2023-03-29 20:02:10 +02:00
Antoine du Hamel
5f76836277
lib: add trailing commas to more internal files
PR-URL: https://github.com/nodejs/node/pull/46811
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2023-02-26 11:34:02 +01:00
Robert Nagy
9e1824d94e
http: correctly calculate strict content length
Fixes some logical errors related to strict content length.

Also, previously Buffer.byteLength (which is slow) was run regardless of
whether or not the len was required.

PR-URL: https://github.com/nodejs/node/pull/46601
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-02-23 09:54:45 +00:00
Marco Ippolito
3fd4343129
http: unify header treatment
PR-URL: https://github.com/nodejs/node/pull/46528
Fixes: https://github.com/nodejs/node/issues/46395
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2023-02-21 11:09:03 +00:00
Tim Perry
ff92b40ffc
http: close the connection after sending a body without declared length
Previously, if you removed both content-length and transfer-encoding
headers, the connection would still be kept-alive by default. This isn't
helpful, because without those headers, the only way the client knows
when the body is completed is when the connection closes.

See https://www.rfc-editor.org/rfc/rfc7230#section-3.3.3 for more
details on this message body handling logic (this is case 7).

This meant that in effect, if you removed both headers every response
came with a 5 second delay at the end (the default KA timeout) before
the client could process it. Now, if you remove both headers the
connection closes automatically immediately, so the client knows that
it has received the whole message body.

PR-URL: https://github.com/nodejs/node/pull/46333
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2023-02-20 20:10:29 +00:00
Tim Perry
2a29df6464
http: keep HTTP/1.1 conns alive even if the Connection header is removed
Previously persistence was completed disabled if you removed this
header, which is not correct for modern HTTP, where the header is
optional and all connections should persist by default regardless.

PR-URL: https://github.com/nodejs/node/pull/46331
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2023-01-30 11:27:37 +00:00
Deokjin Kim
f461a4c5fc
http: refactor to use validateHeaderName
Remove duplicate implementation by using validateHeaderName.

PR-URL: https://github.com/nodejs/node/pull/46143
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-01-17 13:40:39 +00:00
Jordan Harband
757c104147
tools: add prefer-proto rule
fixup: add support for `Object.create(null)`

fixup: extend to any 1-argument Object.create call

fixup: add tests
PR-URL: https://github.com/nodejs/node/pull/46083
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-01-10 05:38:36 +00:00
Marco Ippolito
525a95dbad
http: res.setHeaders first implementation
PR-URL: https://github.com/nodejs/node/pull/46109
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-01-09 19:15:49 +00:00
Robert Nagy
d385106302
http: make OutgoingMessage more streamlike
Implement missing getters error & closed. Add support for
proper "writable" check through `isWritable` helper.

We cannot fix the `OutgoingMessage.writable` property as that
would break the ecosystem.

PR-URL: https://github.com/nodejs/node/pull/45672
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-12-02 10:40:44 +01:00
sidwebworks
91020db933
http: throw error on content-length mismatch
PR-URL: https://github.com/nodejs/node/pull/44378
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2022-09-18 12:39:37 +02:00
theanarkh
12894924af
http: add max for http keepalive
PR-URL: https://github.com/nodejs/node/pull/44217
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-08-16 13:09:10 +00:00
ywave620
93e0bf9abf
http: reuse socket only when it is drained
Ensuring every request is assigned to a drained socket or nothing.
Because is has no benifit for a request to be attached to a non
drained socket and it prevents the request from being assigned to
a drained one, which might occur soon or already in the free pool
We achieve this by claiming a socket as free only when the socket
is drained.

PR-URL: https://github.com/nodejs/node/pull/43902
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2022-07-27 10:09:06 +01:00
Antoine du Hamel
a055337a02
lib: refactor to avoid unsafe regex primordials
PR-URL: https://github.com/nodejs/node/pull/43475
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2022-06-27 17:16:06 +02:00
Antoine du Hamel
06d8606960
lib: use null-prototype objects for property descriptors
Refs: https://github.com/nodejs/node/pull/42921

PR-URL: https://github.com/nodejs/node/pull/43270
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-06-03 09:23:58 +01:00
Shogun
abc175e745 http: add uniqueHeaders option to request and createServer
PR-URL: https://github.com/nodejs/node/pull/41397
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-05-23 10:23:41 +02:00
Santiago Gimeno
ef7a686ed9
http: don't write empty data on req/res end()
When calling OutgoingMessage.end() with empty data argument, avoid
writing to the socket unless there's still pending data to be sent.

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

PR-URL: https://github.com/nodejs/node/pull/41116
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-12-10 19:44:24 +00:00
Artur K
4e8f11dee3 http: limit requests per connection
Fixes: https://github.com/nodejs/node/issues/40071
PR-URL: https://github.com/nodejs/node/pull/40082
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2021-09-19 16:28:20 +02:00
shfshanyue
e9fc67815e http: remove CRLF variable
PR-URL: https://github.com/nodejs/node/pull/40101
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-09-16 09:44:12 -04:00
Michaël Zasso
f504c9c6b8 Revert "http: make HEAD method to work with keep-alive"
This reverts commit 7afa5336ae.

The change breaks clients like cURL.

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

PR-URL: https://github.com/nodejs/node/pull/38949
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2021-06-08 17:54:28 +02:00
Antoine du Hamel
ee9e2a2eb6 lib: revert primordials in a hot path
Evidence has shown that use of primordials have sometimes an impact of
performance. This commit reverts the changes who are most likely to be
responsible for performance regression in the HTTP response path.

PR-URL: https://github.com/nodejs/node/pull/38248
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-04-19 10:23:01 +02:00
Michaël Zasso
3dee23334d
http: optimize debug function correctly
Exporting a variable that will be mutated later doesn't work.

Refs: https://github.com/nodejs/node/issues/37937

PR-URL: https://github.com/nodejs/node/pull/37966
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-03-31 18:21:20 +02:00
Matteo Collina
16920db55e Revert "http: align with stream.Writable"
This reverts commit e2f5bb7574.

Reverted as it caused a significant performance regression.

See: https://github.com/nodejs/node/issues/37937

PR-URL: https://github.com/nodejs/node/pull/37963
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-03-31 17:18:30 +02:00
Daniel Bevenius
f4d3d12327
http: use CRLF conistently in _http_outgoing.js
PR-URL: https://github.com/nodejs/node/pull/37851
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-22 08:42:10 -07:00
simov
4686cb5d81 http: add http.ClientRequest.getRawHeaderNames()
Fixes: https://github.com/nodejs/node/issues/37641

PR-URL: https://github.com/nodejs/node/pull/37660
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-03-20 11:37:55 -07:00
Robert Nagy
e2f5bb7574 http: align with stream.Writable
Futher aligns OutgoingMessage with stream.Writable. In particular
re-uses the construct/destroy logic from streams.

Due to a lot of subtle assumptions this PR unfortunately touches
a lot of different parts.

PR-URL: https://github.com/nodejs/node/pull/36816
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-03-10 15:04:00 +01:00
Antoine du Hamel
4a113be836 http: refactor to avoid unsafe array iteration
PR-URL: https://github.com/nodejs/node/pull/37124
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-02-01 05:47:21 -08:00
Robert Nagy
1b669b2c12 http: don't cork noop .end()
Calling .end() a second time should be a noop and not
leave the socket corked.

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

PR-URL: https://github.com/nodejs/node/pull/36633
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
2021-01-12 11:00:02 +01:00
Joseph Hackman
7afa5336ae http: make HEAD method to work with keep-alive
Fixes: https://github.com/nodejs/node/issues/28438

PR-URL: https://github.com/nodejs/node/pull/34231
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-03 22:52:59 +01:00
Antoine du Hamel
8cf5ae07e9 http: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/36194
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-12-29 16:06:05 +01:00
pooja d.p
dedd0612f0 http: enable call chaining with setHeader()
Make `response.setHeader` return the response object itself
so that multiple header setting can be chained.

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

PR-URL: https://github.com/nodejs/node/pull/35924
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-11-30 05:14:30 -08:00
rickyes
e6e64f7a21 http: onFinish will not be triggered again when finished
PR-URL: https://github.com/nodejs/node/pull/35845
Fixes: https://github.com/nodejs/node/issues/35833
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-11-13 01:25:26 +08:00
Robert Nagy
dd0f8f18c2 stream: writableNeedDrain
Don't write to a stream which already has a full buffer.

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

PR-URL: https://github.com/nodejs/node/pull/35348
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-11-10 10:44:16 +01:00
Robert Nagy
d70c0ed250 http: allow passing array of key/val into writeHead
Enables an optimization when the user already has the headers
in an array form, e.g. when proxying.

PR-URL: https://github.com/nodejs/node/pull/35274
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-10 10:11:41 +02:00
atian25@qq.com
a63e121e33 http: only set keep-alive when not exists
PR-URL: https://github.com/nodejs/node/pull/35138
Fixes: https://github.com/nodejs/node/issues/34561
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-09-12 20:22:56 +08:00
Robert Nagy
849d9e7b90 http: provide keep-alive timeout response header
In http 1.1 persistent connection protocol there is a
timing race where the client sends the request and then
the server kills the connection (due to inactivity)
before receiving the client's request.

By providing a keep-alive header it is possible to provide
the client a hint of when idle timeout would occur and
avoid the race.

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

PR-URL: https://github.com/nodejs/node/pull/34561
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com>
2020-08-01 15:04:35 +02:00
Robert Nagy
a55b77d2d3 stream: finished on closed OutgoingMessage
finished should invoke callback on closed OutgoingMessage the
same way as for regular streams.

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

PR-URL: https://github.com/nodejs/node/pull/34313
Fixes: https://github.com/nodejs/node/issues/34274
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-07-16 08:37:01 +02:00
Robert Nagy
30cc54275d http: don't emit error after close
Refs: https://github.com/nodejs/node/issues/33591

PR-URL: https://github.com/nodejs/node/pull/33654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-06-21 17:21:12 +02:00
Osher
e30a651937 http: tidy up exposure of header validation
PR-URL: https://github.com/nodejs/node/pull/33371
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2020-05-25 19:21:57 +02:00