Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http: correctly calculate strict content length #46601

Merged
merged 11 commits into from
Feb 23, 2023

Conversation

ronag
Copy link
Member

@ronag ronag commented Feb 10, 2023

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

@ronag ronag added the http Issues or PRs related to the http subsystem. label Feb 10, 2023
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Feb 10, 2023

Review requested:

  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Feb 10, 2023
@ronag ronag requested review from anonrig and mcollina February 10, 2023 07:55
@ronag ronag force-pushed the http-byte-len branch 8 times, most recently from dd09cc5 to 481ed62 Compare February 10, 2023 08:35
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@ronag ronag added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed needs-ci PRs that need a full CI run. labels Feb 10, 2023
@github-actions github-actions bot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Feb 10, 2023
@github-actions
Copy link
Contributor

Failed to start CI
- Validating Jenkins credentials
✖  Jenkins credentials invalid
https://github.com/nodejs/node/actions/runs/4142770062

@BridgeAR
Copy link
Member

I wonder if we could also use the V8 fast calls to improve the underlying byteLengthUtf8() call. That might even improve the situation further, if it's possible?

@ronag
Copy link
Member Author

ronag commented Feb 10, 2023

We already have an ongoing discussion regarding this over at the performance repo.

@ronag
Copy link
Member Author

ronag commented Feb 10, 2023

Here is the link, nodejs/performance#52.

@aduh95 aduh95 added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Feb 12, 2023
@ronag ronag added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Feb 15, 2023
@ronag ronag added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 17, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 17, 2023
@nodejs-github-bot
Copy link
Collaborator

@ronag ronag added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 21, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Feb 21, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/46601
✔  Done loading data for nodejs/node/pull/46601
----------------------------------- PR info ------------------------------------
Title      http: correctly calculate strict content length (#46601)
Author     Robert Nagy  (@ronag)
Branch     ronag:http-byte-len -> nodejs:main
Labels     http, author ready
Commits    11
 - http: correctly calculate strict content length
 - http: speedup strict content length
 - http: make sure to pass encoding to Buffer.byteLength
 - http: count writtenBytes even if socket is not ready
 - fixup! http: speedup strict content length
 - fixup! http: speedup strict content length
 - fixuP
 - fixuP
 - fixup
 - fixup: linting
 - fixup: cleanup
Committers 1
 - Robert Nagy 
PR-URL: https://github.com/nodejs/node/pull/46601
Reviewed-By: Matteo Collina 
Reviewed-By: Paolo Insogna 
Reviewed-By: Yagiz Nizipli 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/46601
Reviewed-By: Matteo Collina 
Reviewed-By: Paolo Insogna 
Reviewed-By: Yagiz Nizipli 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last review:
   ⚠  - fixup: linting
   ⚠  - fixup: cleanup
   ℹ  This PR was created on Fri, 10 Feb 2023 07:55:18 GMT
   ✔  Approvals: 3
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/46601#pullrequestreview-1302089257
   ✔  - Paolo Insogna (@ShogunPanda): https://github.com/nodejs/node/pull/46601#pullrequestreview-1292827320
   ✔  - Yagiz Nizipli (@anonrig): https://github.com/nodejs/node/pull/46601#pullrequestreview-1300561862
   ✖  Last GitHub CI failed
   ℹ  Last Full PR CI on 2023-02-17T10:01:39Z: https://ci.nodejs.org/job/node-test-pull-request/49619/
- Querying data for job/node-test-pull-request/49619/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/4234920191

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

still LGTM

@mcollina mcollina added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Feb 23, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Feb 23, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
{"message":"Base branch was modified. Review and try the merge again.","documentation_url":"https://docs.github.com/rest/reference/pulls#merge-a-pull-request"}
https://github.com/nodejs/node/actions/runs/4251305015

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Feb 23, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 23, 2023
@nodejs-github-bot nodejs-github-bot merged commit 9e1824d into nodejs:main Feb 23, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 9e1824d

targos pushed a commit that referenced this pull request Mar 13, 2023
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: #46601
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
danielleadams pushed a commit that referenced this pull request Apr 11, 2023
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: #46601
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants