GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http: add uniqueHeaders option to request and createServer. by ShogunPanda · Pull Request #41397 · nodejs/node

Conversation

@ShogunPanda

@ShogunPanda ShogunPanda commented Jan 4, 2022

Copy link
Copy Markdown
Contributor

This PR adds a new option to both http.request and http.createServer.

The option is named separateHeadersValues (default value false) and it changes existing behavior as follows:

  • For IncomingMessage, all HTTP headers are parsed and all values tracked without performing existing squashing logic.
    All values in message.headers will either be a string if the header has been received once and an array of strings if it
    has been received multiple times.
  • For ClientRequest and ServerResponse, adding an header via .setHeader will append the new value to the list of existing ones. Using an array will behave as the .setHeader was called multiple times. The header will be sent multiple times with the various values.

At the moment this is only on HTTP(S). Once the approach is acknowledged, I'll extend this PR to HTTP2 as well.
Fixes #3591.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with eyes emoji
All reactions
  • 👀 1 reaction
@nodejs-github-bot

nodejs-github-bot commented Jan 4, 2022

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Jan 4, 2022
@ShogunPanda
ShogunPanda force-pushed the multiple-response-headers branch from 01b1f01 to 153d410 Compare January 4, 2022 13:39
@mcollina mcollina added the semver-minor PRs that contain new features and should be released in the next minor version. label Jan 4, 2022
@nodejs-github-bot

nodejs-github-bot commented Jan 4, 2022

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/41736/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mcollina
mcollina previously approved these changes Jan 4, 2022
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ShogunPanda
ShogunPanda force-pushed the multiple-response-headers branch from 153d410 to 9db4bf8 Compare January 4, 2022 13:52
@mcollina mcollina added the needs-benchmark-ci PRs that need a benchmark CI run. label Jan 4, 2022
@mcollina

mcollina commented Jan 4, 2022

Copy link
Copy Markdown
Member

This needs a performance check.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ronag
ronag approved these changes Jan 4, 2022
View reviewed changes
@apapirovski

apapirovski commented Jan 4, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

I think the incoming logic technically breaks the spec expectations. See https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.2

I would recommend looking at how HTTP2 handles incoming headers since it even has a whitelist of known single-value headers according to the specification.

It's also worth noting that X-Robots-Tag breaks the spec expectations since it can't be combined into a single comma-delimited header, which is technically a requirement.

All of that could probably be tolerated if that's what the user wants, but it's probably worth noting in the documentation re: spec compatibility and maybe even linking to known single-value headers. That said, it does feel like using this type of approach comes with a lot of extra overhead for any user while only benefitting a few select headers...

Would love to have @jasnell chime in here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda

ShogunPanda commented Jan 4, 2022

Copy link
Copy Markdown
Contributor Author

@apapirovski I agree with you, in the sending phase it would break compliance if used with most well-known fields.

For custom fields, instead, it's impossible to say since their definition is not part of the standard. So the multisend might or might not be legit according to the use case.

That's also why in the tests I purposely tests against X- fields only.

As the option is disabled by the default, the existing compliant behaviour is kept and the user must explicitly opt-in (which means understanding the risks).
But, as you correctly pointed out, in this case we need to emphasise the consequences in the docs.

I'll integrate the docs shortly.
Thanks for the very good point!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Jan 5, 2022
CI Reliability 2022-01-05 nodejs/reliability#166
Open
26 tasks
@mcollina
mcollina dismissed their stale review January 5, 2022 08:48

After @apapirovski comment, I retract my approval

@mcollina

mcollina commented Jan 5, 2022

Copy link
Copy Markdown
Member

Can we figure out a slightly different API / structure to allow the users to customize the behavior? So that we could support X-Robots-Tag?

Or Maybe we could handle X-Robots-Tag as a "single header field" and just support it as a special case within Node.js? It seems it's one of the major exceptions to the rule.

Wdyt @apapirovski?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski

apapirovski commented Jan 5, 2022

Copy link
Copy Markdown
Contributor

Or Maybe we could handle X-Robots-Tag as a "single header field" and just support it as a special case within Node.js? It seems it's one of the major exceptions to the rule.

Yea, I was sort of imagining that the alternative could be some sort of an optional property containing a list of array-producing headers or something to that effect?

Not actually sure on the best API but seems like the downside of the approach proposed in this PR is it then forces the end-user to do their own post-processing on all headers, not just the non-standard ones like X-Robots-Tag.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jan 6, 2022
CI Reliability 2022-01-06 nodejs/reliability#167
Open
CI Reliability 2022-01-07 nodejs/reliability#168
Open
@ShogunPanda

ShogunPanda commented Jan 7, 2022

Copy link
Copy Markdown
Contributor Author

I personally don't like adding additional specific header exceptions to the code.
Given that in the future new headers might be standardized (either de jure or de facto), then we might lose control on this.
I'm leaning towards a completely rethinking of this problem.

What about introducing a new set of optional callbacks in the API, both on IncomingMessage and OutgoingMessage which control how headers are processed?
Something like (names are provisional):

  • onSetHeader: Used in OutgoingMessage when setHeader and similar are called, used to eventually modify the current logic which now completely replaces the value.
  • onSerializeHeader: Used in OutgoingMessage when the data is being sent out, so the user can eventually bypass the squashing logic
  • onReceiveHeader: Used in IncomingMessage when a new header is received in the request, this might be used to check if we want to join with an eventual previous value or we want to replace it.

@mcollina @apapirovski WDYT?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina

mcollina commented Jan 7, 2022

Copy link
Copy Markdown
Member

How does the WHATWG Headers object manage this case?

I'm ok in adding a list because it does not seem to be something that requires a lot of changes over time, so maybe we are ok.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda

ShogunPanda commented Jan 7, 2022

Copy link
Copy Markdown
Contributor Author

I've checked the WHATWG spec.
When parsing (so for IncomingMessage), they follow the same logic we currently use the same logic as WHATWG, with the noticeable exception of Set-Cookie. So we're good here.

The problem arise in OutgoingMessage. WHATWG spec technically supports appending of an header to a value, while we only support setting (which means replacing).

Now, given the original problem, we probably don't have to modify IncomingMessage. I would add (like you suggested) a list parameter to http.request and createServer, named multipleHeaders or similar, which will let the user explicitly select which headers (eventually including well-known one) they want to send multiple times with separate values.

For developer experience, I would also add the new methods in the API:

  1. Add a OutgoingMessage.appendHeader method to make the use of the parameter above easier.
  2. Add a IncomingMessage.headersValues which duplicates IncomingMessage.headers with the exception that values are ALWAYS lists (even for an header received once) and never joined.

By following the new methods approach we know that existing functionality or user expectation will not break and we can provide missing functionality.

What do you think?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jan 8, 2022
CI Reliability 2022-01-08 nodejs/reliability#169
Open
CI Reliability 2022-01-09 nodejs/reliability#170
Open
@mcollina

mcollina commented Jan 10, 2022

Copy link
Copy Markdown
Member

I'm good with that proposal - bear in mind that the data structure we use for Headers could hopefully be improved/made faster.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda

ShogunPanda commented Jan 10, 2022

Copy link
Copy Markdown
Contributor Author

Hello all!
I've reworked the PR as proposed.
At the end of the day, rereading issue #3591 better, I realize the problem was mostly in IncomingMessage as the server already supports multiple headers.
I think users were using node on both on client and server and this led them to think that sending X-Robots-Tag multiple times was not supported, while this is not the case.

Anyway, the final version of this PR makes the following changes which should solve the issue forever:

  1. Added a http.OutgoingMessage.appendHeader to append values to an header.
    Basically from now instead of doing this:

    message.setHeader('name', ['value1', 'value2', 'value3'])
    

    You can do:

    message.setHeader('name', 'value1')
    message.appendHeader('name', ['value2', 'value3'])
    

    Note that if there is now existing value, appendHeader falls back into setHeader so in theory one could just use the former in all use cases.

  2. Added a new option uniqueHeaders in http.request and http.createServer. This is a (optional) list of headers which should only be sent once when sending the request of the response.
    If the header is present in the list and its value is an array, then sent header value will be value.join(', ').
    For instance, following the previous example, if uniqueHeaders contains name, then the sent header will be name: value1, value2, value3

  3. Added two new properties in http.IncomingMessage, called headersDistinct and trailersDistinct. They behave like headers and trailers, but the array values are always an array of string. Each item is the value of a request header, so if an header is received multiple times, then the array's size is greater than one.

    For instance, given this headers:

    Connection: close
    X-Custom: value1
    X-Custom: value2
    

    Then message.headersDistinct will be:

    {
       connection: ['close'],
       'x-custom': ['value1', 'value2']
    }
    

Let me know if this works for you. If that's the case, I'll finalize this PR by checking if we can improve data structures as @mcollina suggested.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda
ShogunPanda force-pushed the multiple-response-headers branch from 9db4bf8 to 867b723 Compare January 10, 2022 20:51
@ShogunPanda ShogunPanda changed the title http: add separateHeadersValues option to request and createServer. http: add uniqueHeaders option to request and createServer. Jan 10, 2022
@github-actions github-actions Bot mentioned this pull request Jan 12, 2022
CI Reliability 2022-01-12 nodejs/reliability#171
Open
20 tasks
@aduh95

aduh95 commented Mar 12, 2022

Copy link
Copy Markdown
Contributor

This needs a rebase.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda
ShogunPanda force-pushed the multiple-response-headers branch from 364c1ab to 12b3b22 Compare May 20, 2022 09:15
@nodejs-github-bot

nodejs-github-bot commented May 20, 2022

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/44091/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina

mcollina commented May 21, 2022

Copy link
Copy Markdown
Member

have you tried to reduce the number of retries?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda

ShogunPanda commented May 22, 2022

Copy link
Copy Markdown
Contributor Author

That was not really the issue IMHO. In some cases the benchmark CI stopped before even reaching 10ish tests

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented May 22, 2022

Copy link
Copy Markdown
Contributor

@mcollina @ronag I tried to run benchmarks on the CI but the job is never able to finish. Are we confident to land this?

We should try to revive nodejs/build#2656, not sure it would solve the issue, but it would definitely help debugging.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ShogunPanda

ShogunPanda commented May 23, 2022

Copy link
Copy Markdown
Contributor Author

Landed in abc175e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ShogunPanda added a commit that referenced this pull request May 23, 2022
@ShogunPanda
http: add uniqueHeaders option to request and createServer
abc175e
PR-URL: #41397
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@ShogunPanda ShogunPanda closed this May 23, 2022
bengl pushed a commit that referenced this pull request May 30, 2022
@ShogunPanda @bengl
http: add uniqueHeaders option to request and createServer
9539cfa
PR-URL: #41397
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@bengl bengl mentioned this pull request May 31, 2022
v18.3.0 proposal #43266
Merged
bengl added a commit that referenced this pull request May 31, 2022
@bengl
2022-05-31, Version 18.3.0 (Current)
0ffe469
Notable changes:

* deps: update undici to 5.3.0 (Node.js GitHub Bot) #43197
* (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* deps: upgrade npm to 8.11.0 (npm team) #43210
* deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067
* (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740
* (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112

PR-URL: #43266
bengl added a commit that referenced this pull request Jun 1, 2022
@bengl
2022-05-31, Version 18.3.0 (Current)
ac59933
Notable changes:

* deps: update undici to 5.3.0 (Node.js GitHub Bot) #43197
* (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* deps: upgrade npm to 8.11.0 (npm team) #43210
* deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067
* (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740
* (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
* (SEMVER-MINOR) Revert "build: make x86 Windows support temporarily experimental" (Michaël Zasso) [#42740](#42740)
  * This means 32-bit Windows binaries are back with this release.

PR-URL: #43266
bengl added a commit that referenced this pull request Jun 1, 2022
@bengl
2022-06-01, Version 18.3.0 (Current)
7a2ee56
Notable changes:

* deps: update undici to 5.3.0 (Node.js GitHub Bot) #43197
* (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* deps: upgrade npm to 8.11.0 (npm team) #43210
* deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067
* (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740
* (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
* (SEMVER-MINOR) Revert "build: make x86 Windows support temporarily experimental" (Michaël Zasso) [#42740](#42740)
  * This means 32-bit Windows binaries are back with this release.

PR-URL: #43266
bengl added a commit that referenced this pull request Jun 1, 2022
@bengl
2022-06-01, Version 18.3.0 (Current)
49362ef
Notable changes:

* deps: update undici to 5.4.0  (Node.js GitHub Bot) #43262
* (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* deps: upgrade npm to 8.11.0 (npm team) #43210
* deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067
* (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740
* (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
* (SEMVER-MINOR) Revert "build: make x86 Windows support temporarily experimental" (Michaël Zasso) [#42740](#42740)
  * This means 32-bit Windows binaries are back with this release.

PR-URL: #43266
bengl added a commit that referenced this pull request Jun 2, 2022
@bengl
2022-06-01, Version 18.3.0 (Current)
55f56ef
Notable changes:

* deps: update undici to 5.4.0  (Node.js GitHub Bot) #43262
* (SEMVER-MINOR) util: add parseArgs module (Benjamin Coe) #42675
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* deps: upgrade npm to 8.11.0 (npm team) #43210
* deps: patch V8 to 10.2.154.4 (Michaël Zasso) #43067
* (SEMVER-MINOR) deps: update V8 to 10.2.154.2 (Michaël Zasso) #42740
* (SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
* (SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
* (SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
* (SEMVER-MINOR) Revert "build: make x86 Windows support temporarily experimental" (Michaël Zasso) [#42740](#42740)
  * This means 32-bit Windows binaries are back with this release.

PR-URL: #43266
@ShogunPanda
ShogunPanda deleted the multiple-response-headers branch June 27, 2022 10:38
targos pushed a commit that referenced this pull request Jul 12, 2022
@ShogunPanda @targos
http: add uniqueHeaders option to request and createServer
cb74011
PR-URL: #41397
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2022
@ShogunPanda @targos
http: add uniqueHeaders option to request and createServer
9d1b4b7
PR-URL: #41397
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@targos targos mentioned this pull request Aug 2, 2022
v16.17.0 release proposal #44098
Merged
targos added a commit that referenced this pull request Aug 6, 2022
@targos
2022-08-16, Version 16.17.0 'Gallium' (LTS)
cd03cc3
Notable changes:

Adds `util.parseArgs` helper for higher level command-line argument
parsing.

Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi,
Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband.
#42675

Node.js ESM Loader hooks now support multiple custom loaders, and
composition is achieved via "chaining": `foo-loader` calls `bar-loader`
calls `qux-loader` (a custom loader _must_ now signal a short circuit
when intentionally not calling the next). See the ESM docs
(https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) for details.

Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias.
#42623

The `node:test` module, which was initially introduced in Node.js
v18.0.0, is now available with all the changes done to it up to Node.js
v18.7.0.

To better align Node.js' experimental implementation of the Web Crypto
API with other runtimes, several changes were made:

* Support for CFRG curves was added, with the `'Ed25519'`, `'Ed448'`,
  `'X25519'`, and `'X448'` algorithms.
* The proprietary `'NODE-DSA'`, `'NODE-DH'`, `'NODE-SCRYPT'`,
  `'NODE-ED25519'`, `'NODE-ED448'`, `'NODE-X25519'`, and `'NODE-X448'`
  algorithms were removed.
* The proprietary `'node.keyObject'` import/export format was removed.

Contributed by Filip Skokan.
#42507
#43310

Updated Corepack to 0.12.1 - #43965
Updated ICU to 71.1 - #42655
Updated npm to 8.15.0 - #43917
Updated Undici to 5.8.0 - #43886

(SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) [#42427](#42427)
(SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) [#42816](#42816)
(SEMVER-MINOR) dns: export error code constants from `dns/promises` (Feng Yu) [#43176](#43176)
doc: deprecate ercion to integer in process.exit (Daeyeon Jeong) [#43738](#43738)
(SEMVER-MINOR) doc: deprecate diagnostics\_channel object subscribe method (Stephen Belanger) [#42714](#42714)
(SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) [#41008](#41008)
(SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) [#43885](#43885)
(SEMVER-MINOR) events: add `CustomEvent` (Daeyeon Jeong) [#43514](#43514)
(SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) [#41008](#41008)
(SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) [#41008](#41008)
(SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) [#42601](#42601)
(SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) [#42768](#42768)
(SEMVER-MINOR) http: add drop request event for http server (theanarkh) [#43806](#43806)
(SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) [#43580](#43580)
(SEMVER-MINOR) http: add perf\_hooks detail for http request and client (theanarkh) [#43361](#43361)
(SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) [#41397](#41397)
(SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) [#41008](#41008)
(SEMVER-MINOR) http2: compat support for array headers (OneNail) [#42901](#42901)
(SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) [#41008](#41008)
(SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) [#40951](#40951)
(SEMVER-MINOR) lib: improved diagnostics\_channel subscribe/unsubscribe (Stephen Belanger) [#42714](#42714)
(SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) [#43396](#43396)
(SEMVER-MINOR) moduleepl**: support 'node:'-only core modules (Colin Ihrig) [#42325](#42325)
(SEMVER-MINOR) net: add drop event for net server (theanarkh) [#43582](#43582)
(SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) [#43112](#43112)
(SEMVER-MINOR) nodepi**: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) [#36510](#36510)
(SEMVER-MINOR) perfhooks**: add PerformanceResourceTiming (RafaelGSS) [#42725](#42725)
(SEMVER-MINOR) report: add more heap infos in process report (theanarkh) [#43116](#43116)
(SEMVER-MINOR) src: add --openssl-legacy-provider option (Daniel Bevenius) [#40478](#40478)
(SEMVER-MINOR) src: define fs.constants.S\_IWUSR & S\_IRUSR for Win (Liviu Ionescu) [#42757](#42757)
(SEMVER-MINOR) srcoc,test**: add --openssl-shared-config option (Daniel Bevenius) [#43124](#43124)
(SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) [#41008](#41008)
(SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) [#41849](#41849)
(SEMVER-MINOR) stream: add writableAborted (Robert Nagy) [#40802](#40802)
(SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) [#41008](#41008)
(SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) [#43329](#43329)
(SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) [#42784](#42784)
(SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) [#42849](#42849)

PR-URL: #44098
targos added a commit that referenced this pull request Aug 15, 2022
@targos
2022-08-16, Version 16.17.0 'Gallium' (LTS)
30187ba
Notable changes:

Adds `util.parseArgs` helper for higher level command-line argument
parsing.
Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi,
Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband.
#42675

Node.js ESM Loader hooks now support multiple custom loaders, and
composition is achieved via "chaining": `foo-loader` calls `bar-loader`
calls `qux-loader` (a custom loader _must_ now signal a short circuit
when intentionally not calling the next). See the ESM docs
(https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) for details.
Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias.
#42623

The `node:test` module, which was initially introduced in Node.js
v18.0.0, is now available with all the changes done to it up to Node.js
v18.7.0.

To better align Node.js' experimental implementation of the Web Crypto
API with other runtimes, several changes were made:
* Support for CFRG curves was added, with the `'Ed25519'`, `'Ed448'`,
  `'X25519'`, and `'X448'` algorithms.
* The proprietary `'NODE-DSA'`, `'NODE-DH'`, `'NODE-SCRYPT'`,
  `'NODE-ED25519'`, `'NODE-ED448'`, `'NODE-X25519'`, and `'NODE-X448'`
  algorithms were removed.
* The proprietary `'node.keyObject'` import/export format was removed.
Contributed by Filip Skokan.
#42507
#43310

Updated Corepack to 0.12.1 - #43965
Updated ICU to 71.1 - #42655
Updated npm to 8.15.0 - #43917
Updated Undici to 5.8.0 - #43886

(SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
(SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) #42816
(SEMVER-MINOR) dns: export error code constants from `dns/promises` (Feng Yu) #43176
doc: deprecate coercion to integer in process.exit (Daeyeon Jeong) #43738
(SEMVER-MINOR) doc: deprecate diagnostics_channel object subscribe method (Stephen Belanger) #42714
(SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) #41008
(SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) #43885
(SEMVER-MINOR) events: add `CustomEvent` (Daeyeon Jeong) #43514
(SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) #41008
(SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) #41008
(SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
(SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) #42768
(SEMVER-MINOR) http: add drop request event for http server (theanarkh) #43806
(SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) #43580
(SEMVER-MINOR) http: add perf_hooks detail for http request and client (theanarkh) #43361
(SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
(SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) #41008
(SEMVER-MINOR) http2: compat support for array headers (OneNail) #42901
(SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) #41008
(SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) #40951
(SEMVER-MINOR) lib: improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) #42714
(SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) #43396
(SEMVER-MINOR) module,repl: support 'node:'-only core modules (Colin Ihrig) #42325
(SEMVER-MINOR) net: add drop event for net server (theanarkh) #43582
(SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
(SEMVER-MINOR) node-api: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) #36510
(SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) #42725
(SEMVER-MINOR) report: add more heap infos in process report (theanarkh) #43116
(SEMVER-MINOR) src: add --openssl-legacy-provider option (Daniel Bevenius) #40478
(SEMVER-MINOR) src: define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) #42757
(SEMVER-MINOR) src,doc,test: add --openssl-shared-config option (Daniel Bevenius) #43124
(SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) #41008
(SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) #41849
(SEMVER-MINOR) stream: add writableAborted (Robert Nagy) #40802
(SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) #41008
(SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) #43329
(SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) #42784
(SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) #42849

PR-URL: #44098
targos added a commit that referenced this pull request Aug 16, 2022
@targos
2022-08-16, Version 16.17.0 'Gallium' (LTS)
5e5fb82
Notable changes:

Adds `util.parseArgs` helper for higher level command-line argument
parsing.
Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi,
Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband.
#42675

Node.js ESM Loader hooks now support multiple custom loaders, and
composition is achieved via "chaining": `foo-loader` calls `bar-loader`
calls `qux-loader` (a custom loader _must_ now signal a short circuit
when intentionally not calling the next). See the ESM docs
(https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) for details.
Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias.
#42623

The `node:test` module, which was initially introduced in Node.js
v18.0.0, is now available with all the changes done to it up to Node.js
v18.7.0.

To better align Node.js' experimental implementation of the Web Crypto
API with other runtimes, several changes were made:
* Support for CFRG curves was added, with the `'Ed25519'`, `'Ed448'`,
  `'X25519'`, and `'X448'` algorithms.
* The proprietary `'NODE-DSA'`, `'NODE-DH'`, `'NODE-SCRYPT'`,
  `'NODE-ED25519'`, `'NODE-ED448'`, `'NODE-X25519'`, and `'NODE-X448'`
  algorithms were removed.
* The proprietary `'node.keyObject'` import/export format was removed.
Contributed by Filip Skokan.
#42507
#43310

Updated Corepack to 0.12.1 - #43965
Updated ICU to 71.1 - #42655
Updated npm to 8.15.0 - #43917
Updated Undici to 5.8.0 - #43886

(SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
(SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) #42816
(SEMVER-MINOR) dns: export error code constants from `dns/promises` (Feng Yu) #43176
doc: deprecate coercion to integer in process.exit (Daeyeon Jeong) #43738
(SEMVER-MINOR) doc: deprecate diagnostics_channel object subscribe method (Stephen Belanger) #42714
(SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) #41008
(SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) #43885
(SEMVER-MINOR) events: add `CustomEvent` (Daeyeon Jeong) #43514
(SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) #41008
(SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) #41008
(SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
(SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) #42768
(SEMVER-MINOR) http: add drop request event for http server (theanarkh) #43806
(SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) #43580
(SEMVER-MINOR) http: add perf_hooks detail for http request and client (theanarkh) #43361
(SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
(SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) #41008
(SEMVER-MINOR) http2: compat support for array headers (OneNail) #42901
(SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) #41008
(SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) #40951
(SEMVER-MINOR) lib: improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) #42714
(SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) #43396
(SEMVER-MINOR) module,repl: support 'node:'-only core modules (Colin Ihrig) #42325
(SEMVER-MINOR) net: add drop event for net server (theanarkh) #43582
(SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
(SEMVER-MINOR) node-api: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) #36510
(SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) #42725
(SEMVER-MINOR) report: add more heap infos in process report (theanarkh) #43116
(SEMVER-MINOR) src: add --openssl-legacy-provider option (Daniel Bevenius) #40478
(SEMVER-MINOR) src: define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) #42757
(SEMVER-MINOR) src,doc,test: add --openssl-shared-config option (Daniel Bevenius) #43124
(SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) #41008
(SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) #41849
(SEMVER-MINOR) stream: add writableAborted (Robert Nagy) #40802
(SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) #41008
(SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) #43329
(SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) #42784
(SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) #42849

PR-URL: #44098
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
@ShogunPanda @guangwong
http: add uniqueHeaders option to request and createServer
e00a07e
PR-URL: nodejs/node#41397
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
@targos @guangwong
2022-08-16, Version 16.17.0 'Gallium' (LTS)
d18fe93
Notable changes:

Adds `util.parseArgs` helper for higher level command-line argument
parsing.
Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi,
Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband.
nodejs/node#42675

Node.js ESM Loader hooks now support multiple custom loaders, and
composition is achieved via "chaining": `foo-loader` calls `bar-loader`
calls `qux-loader` (a custom loader _must_ now signal a short circuit
when intentionally not calling the next). See the ESM docs
(https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) for details.
Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias.
nodejs/node#42623

The `node:test` module, which was initially introduced in Node.js
v18.0.0, is now available with all the changes done to it up to Node.js
v18.7.0.

To better align Node.js' experimental implementation of the Web Crypto
API with other runtimes, several changes were made:
* Support for CFRG curves was added, with the `'Ed25519'`, `'Ed448'`,
  `'X25519'`, and `'X448'` algorithms.
* The proprietary `'NODE-DSA'`, `'NODE-DH'`, `'NODE-SCRYPT'`,
  `'NODE-ED25519'`, `'NODE-ED448'`, `'NODE-X25519'`, and `'NODE-X448'`
  algorithms were removed.
* The proprietary `'node.keyObject'` import/export format was removed.
Contributed by Filip Skokan.
nodejs/node#42507
nodejs/node#43310

Updated Corepack to 0.12.1 - nodejs/node#43965
Updated ICU to 71.1 - nodejs/node#42655
Updated npm to 8.15.0 - nodejs/node#43917
Updated Undici to 5.8.0 - nodejs/node#43886

(SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) nodejs/node#42427
(SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) nodejs/node#42816
(SEMVER-MINOR) dns: export error code constants from `dns/promises` (Feng Yu) nodejs/node#43176
doc: deprecate coercion to integer in process.exit (Daeyeon Jeong) nodejs/node#43738
(SEMVER-MINOR) doc: deprecate diagnostics_channel object subscribe method (Stephen Belanger) nodejs/node#42714
(SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) nodejs/node#41008
(SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) nodejs/node#43885
(SEMVER-MINOR) events: add `CustomEvent` (Daeyeon Jeong) nodejs/node#43514
(SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) nodejs/node#41008
(SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) nodejs/node#41008
(SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) nodejs/node#42601
(SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) nodejs/node#42768
(SEMVER-MINOR) http: add drop request event for http server (theanarkh) nodejs/node#43806
(SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) nodejs/node#43580
(SEMVER-MINOR) http: add perf_hooks detail for http request and client (theanarkh) nodejs/node#43361
(SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) nodejs/node#41397
(SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) nodejs/node#41008
(SEMVER-MINOR) http2: compat support for array headers (OneNail) nodejs/node#42901
(SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) nodejs/node#41008
(SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) nodejs/node#40951
(SEMVER-MINOR) lib: improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) nodejs/node#42714
(SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) nodejs/node#43396
(SEMVER-MINOR) module,repl: support 'node:'-only core modules (Colin Ihrig) nodejs/node#42325
(SEMVER-MINOR) net: add drop event for net server (theanarkh) nodejs/node#43582
(SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) nodejs/node#43112
(SEMVER-MINOR) node-api: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) nodejs/node#36510
(SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) nodejs/node#42725
(SEMVER-MINOR) report: add more heap infos in process report (theanarkh) nodejs/node#43116
(SEMVER-MINOR) src: add --openssl-legacy-provider option (Daniel Bevenius) nodejs/node#40478
(SEMVER-MINOR) src: define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) nodejs/node#42757
(SEMVER-MINOR) src,doc,test: add --openssl-shared-config option (Daniel Bevenius) nodejs/node#43124
(SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) nodejs/node#41008
(SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) nodejs/node#41849
(SEMVER-MINOR) stream: add writableAborted (Robert Nagy) nodejs/node#40802
(SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) nodejs/node#41008
(SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) nodejs/node#43329
(SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) nodejs/node#42784
(SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) nodejs/node#42849

PR-URL: nodejs/node#44098
@coderabbitai coderabbitai Bot mentioned this pull request Jul 24, 2026
fix: system-wide audit — harden auth, validation, idempotency, outbox and queue paths chuanghiduoc/nestjs-fastify-nx#127
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@ronag ronag ronag approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-benchmark-ci PRs that need a benchmark CI run. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

multiple headers of the "same name" allowed in http

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@ShogunPanda @nodejs-github-bot @mcollina @apapirovski @aduh95 @ronag
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.