Skip to content

http,http2: make early hints generic - #44820

Merged
nodejs-github-bot merged 7 commits into
nodejs:mainfrom
anonrig:feat/early-hint-generic
Oct 6, 2022
Merged

http,http2: make early hints generic#44820
nodejs-github-bot merged 7 commits into
nodejs:mainfrom
anonrig:feat/early-hint-generic

Conversation

@anonrig

@anonriganonrig commented Sep 29, 2022

Copy link
Copy Markdown
Member

Make early hints receive object as a parameter.
Fixes: #44816

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/http2
  • @nodejs/net

@nodejs-github-botnodejs-github-bot added http Issues or PRs related to the http subsystem. http2 Issues or PRs related to the http2 subsystem. needs-ci PRs that need a full CI run. labels Sep 29, 2022
@anonrig
anonrig marked this pull request as ready for review September 29, 2022 14:21

@climba03003climba03003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Early Hints is not released in any version of node.
I believe the implementation here can change to plain object or Array.

It does not require a special case for Link only.

Comment threadlib/internal/validators.js Outdated
Comment threaddoc/api/http.md Outdated
@Uzlopak

Copy link
Copy Markdown
Contributor

I know you closed the remark regarding the regex. But could you please open an issue, so that this is tracked?

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@mcollina

Copy link
Copy Markdown
Member

Can you update the PR title and commit line to be prefixed http,http2:?

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@anonriganonrig changed the title http2: make early hints generichttp,http2: make early hints genericOct 2, 2022
@anonrig

Copy link
Copy Markdown
MemberAuthor

Updated the title @mcollina

@mcollinamcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 2, 2022
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 2, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@RafaelGSSRafaelGSS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@RafaelGSSRafaelGSS added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 2, 2022
Comment threaddoc/api/http.md Outdated
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 6, 2022
@nodejs-github-bot
nodejs-github-bot merged commit 37f1e4b into nodejs:mainOct 6, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 37f1e4b

@mcollinamcollina added the semver-minor PRs that contain new features and should be released in the next minor version. label Oct 6, 2022
danielleadams pushed a commit that referenced this pull request Oct 11, 2022
PR-URL: #44820Fixes: #44816
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: Rafael Gonzaga <rafael.nunu@hotmail.com>
@danielleadamsdanielleadams mentioned this pull request Oct 11, 2022
danielleadams added a commit that referenced this pull request Oct 12, 2022
watch mode (experimental):
Running in 'watch' mode using `node --watch` restarts the process when an
imported file is changed.
Contributed by Moshe Atlow in [#44366](#44366)
Other notable changes:
* fs:
* (SEMVER-MINOR) add `FileHandle.prototype.readLines` (Antoine du Hamel)
#42590
* http:
* (SEMVER-MINOR) add writeEarlyHints function to ServerResponse (Wing)
#44180
* http2:
* (SEMVER-MINOR) make early hints generic (Yagiz Nizipli) #44820
* lib:
* (SEMVER-MINOR) refactor transferable AbortSignal (flakey5) #44048
* src:
* (SEMVER-MINOR) add detailed embedder process initialization API (Anna
Henningsen) #44121
* util:
* (SEMVER-MINOR) add default value option to parsearg (Manuel Spigolon)
#44631
PR-URL: #44968
danielleadams added a commit that referenced this pull request Oct 13, 2022
watch mode (experimental):
Running in 'watch' mode using `node --watch` restarts the process when an
imported file is changed.
Contributed by Moshe Atlow in [#44366](#44366)
Other notable changes:
* fs:
* (SEMVER-MINOR) add `FileHandle.prototype.readLines` (Antoine du Hamel)
#42590
* http:
* (SEMVER-MINOR) add writeEarlyHints function to ServerResponse (Wing)
#44180
* http2:
* (SEMVER-MINOR) make early hints generic (Yagiz Nizipli) #44820
* lib:
* (SEMVER-MINOR) refactor transferable AbortSignal (flakey5) #44048
* src:
* (SEMVER-MINOR) add detailed embedder process initialization API (Anna
Henningsen) #44121
* util:
* (SEMVER-MINOR) add default value option to parsearg (Manuel Spigolon)
#44631
PR-URL: #44968
danielleadams added a commit that referenced this pull request Oct 13, 2022
watch mode (experimental):
Running in 'watch' mode using `node --watch` restarts the process when an
imported file is changed.
Contributed by Moshe Atlow in [#44366](#44366)
Other notable changes:
* fs:
* (SEMVER-MINOR) add `FileHandle.prototype.readLines` (Antoine du Hamel)
#42590
* http:
* (SEMVER-MINOR) add writeEarlyHints function to ServerResponse (Wing)
#44180
* http2:
* (SEMVER-MINOR) make early hints generic (Yagiz Nizipli) #44820
* lib:
* (SEMVER-MINOR) refactor transferable AbortSignal (flakey5) #44048
* src:
* (SEMVER-MINOR) add detailed embedder process initialization API (Anna
Henningsen) #44121
* util:
* (SEMVER-MINOR) add default value option to parsearg (Manuel Spigolon)
#44631
PR-URL: #44968
danielleadams added a commit that referenced this pull request Oct 13, 2022
watch mode (experimental):
Running in 'watch' mode using `node --watch` restarts the process when an
imported file is changed.
Contributed by Moshe Atlow in #44366
Other notable changes:
* fs:
* (SEMVER-MINOR) add `FileHandle.prototype.readLines` (Antoine du Hamel)
#42590
* http:
* (SEMVER-MINOR) add writeEarlyHints function to ServerResponse (Wing)
#44180
* http2:
* (SEMVER-MINOR) make early hints generic (Yagiz Nizipli) #44820
* lib:
* (SEMVER-MINOR) refactor transferable AbortSignal (flakey5) #44048
* src:
* (SEMVER-MINOR) add detailed embedder process initialization API (Anna
Henningsen) #44121
* util:
* (SEMVER-MINOR) add default value option to parsearg (Manuel Spigolon)
#44631
PR-URL: #44968
danielleadams added a commit that referenced this pull request Oct 13, 2022
watch mode (experimental):
Running in 'watch' mode using `node --watch` restarts the process when an
imported file is changed.
Contributed by Moshe Atlow in #44366
Other notable changes:
* fs:
* (SEMVER-MINOR) add `FileHandle.prototype.readLines` (Antoine du Hamel)
#42590
* http:
* (SEMVER-MINOR) add writeEarlyHints function to ServerResponse (Wing)
#44180
* http2:
* (SEMVER-MINOR) make early hints generic (Yagiz Nizipli) #44820
* lib:
* (SEMVER-MINOR) refactor transferable AbortSignal (flakey5) #44048
* src:
* (SEMVER-MINOR) add detailed embedder process initialization API (Anna
Henningsen) #44121
* util:
* (SEMVER-MINOR) add default value option to parsearg (Manuel Spigolon)
#44631
PR-URL: #44968
danielleadams added a commit that referenced this pull request Oct 13, 2022
watch mode (experimental):
Running in 'watch' mode using `node --watch` restarts the process when an
imported file is changed.
Contributed by Moshe Atlow in #44366
Other notable changes:
* fs:
* (SEMVER-MINOR) add `FileHandle.prototype.readLines` (Antoine du Hamel)
#42590
* http:
* (SEMVER-MINOR) add writeEarlyHints function to ServerResponse (Wing)
#44180
* http2:
* (SEMVER-MINOR) make early hints generic (Yagiz Nizipli) #44820
* lib:
* (SEMVER-MINOR) refactor transferable AbortSignal (flakey5) #44048
* src:
* (SEMVER-MINOR) add detailed embedder process initialization API (Anna
Henningsen) #44121
* util:
* (SEMVER-MINOR) add default value option to parsearg (Manuel Spigolon)
#44631
PR-URL: #44968
nodejs-github-bot pushed a commit that referenced this pull request Oct 17, 2022
Both http and http2 `response.writeEarlyHints()` take an object,
not an array, as their first parameter. For http, this was updated in
the examples via #44820 except for the final example, which this
patch fixes.
The doc for the http2 version was not touched in #44820 although
I am pretty sure from skimming the code that it behaves identically
to http, and so propose to change its doc as well.
Finally, some bogus headline levels are fixed in http2 docs.
PR-URL: #45000
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
RafaelGSS pushed a commit that referenced this pull request Nov 1, 2022
Both http and http2 `response.writeEarlyHints()` take an object,
not an array, as their first parameter. For http, this was updated in
the examples via #44820 except for the final example, which this
patch fixes.
The doc for the http2 version was not touched in #44820 although
I am pretty sure from skimming the code that it behaves identically
to http, and so propose to change its doc as well.
Finally, some bogus headline levels are fixed in http2 docs.
PR-URL: #45000
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
RafaelGSS pushed a commit that referenced this pull request Nov 4, 2022
Both http and http2 `response.writeEarlyHints()` take an object,
not an array, as their first parameter. For http, this was updated in
the examples via #44820 except for the final example, which this
patch fixes.
The doc for the http2 version was not touched in #44820 although
I am pretty sure from skimming the code that it behaves identically
to http, and so propose to change its doc as well.
Finally, some bogus headline levels are fixed in http2 docs.
PR-URL: #45000
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
RafaelGSS pushed a commit that referenced this pull request Nov 10, 2022
Both http and http2 `response.writeEarlyHints()` take an object,
not an array, as their first parameter. For http, this was updated in
the examples via #44820 except for the final example, which this
patch fixes.
The doc for the http2 version was not touched in #44820 although
I am pretty sure from skimming the code that it behaves identically
to http, and so propose to change its doc as well.
Finally, some bogus headline levels are fixed in http2 docs.
PR-URL: #45000
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
Both http and http2 `response.writeEarlyHints()` take an object,
not an array, as their first parameter. For http, this was updated in
the examples via #44820 except for the final example, which this
patch fixes.
The doc for the http2 version was not touched in #44820 although
I am pretty sure from skimming the code that it behaves identically
to http, and so propose to change its doc as well.
Finally, some bogus headline levels are fixed in http2 docs.
PR-URL: #45000
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
Both http and http2 `response.writeEarlyHints()` take an object,
not an array, as their first parameter. For http, this was updated in
the examples via #44820 except for the final example, which this
patch fixes.
The doc for the http2 version was not touched in #44820 although
I am pretty sure from skimming the code that it behaves identically
to http, and so propose to change its doc as well.
Finally, some bogus headline levels are fixed in http2 docs.
PR-URL: #45000
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.httpIssues or PRs related to the http subsystem.http2Issues or PRs related to the http2 subsystem.needs-ciPRs that need a full CI run.semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http: make early hints implementation more generic

9 participants

@anonrig@nodejs-github-bot@Uzlopak@mcollina@jasnell@JungMinu@zekth@climba03003@RafaelGSS