| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
|
Lines 1040 to 1041 in c46b2b9 The timing for resetting the keep-alive timeout should be limited to this part—specifically, when llhttp determines that parsing is necessary. |
Sorry, something went wrong.
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files @@ Coverage Diff @@
## main #58178 +/- ##
==========================================
- Coverage 90.21% 90.13% -0.09%
==========================================
Files 630 630
Lines 186391 186782 +391
Branches 36608 36654 +46
==========================================
+ Hits 168161 168357 +196
- Misses 11052 11203 +151
- Partials 7178 7222 +44
... and 78 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
Failed to start CI⚠ No approving reviews found ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/14841662619 |
Sorry, something went wrong.
|
|
||
| server.listen(0); | ||
|
|
||
| const client = connect({ |
There was a problem hiding this comment.
I would create the connection after the server emits the 'listening' event.
Sorry, something went wrong.
| }, 100); | ||
|
|
||
| client.on('data', (data) => { | ||
| const status = data.toString().split(' ')[1]; |
There was a problem hiding this comment.
There is no guarantee that all data will be received in a single chunk.
Sorry, something went wrong.
There was a problem hiding this comment.
Thx, fixed test code.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Lgtm
Sorry, something went wrong.
Sorry, something went wrong.
Commit Queue failed- Loading data for nodejs/node/pull/58178 ✔ Done loading data for nodejs/node/pull/58178 ----------------------------------- PR info ------------------------------------ Title http: fix keep-alive not timing out after post-request empty line (#58178) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch islandryu:fix/httpEmptyLine -> nodejs:main Labels http, author ready, needs-ci Commits 2 - http: fix keep-alive not timing out after post-request empty line - fix test Committers 1 - islandryu <shimaryuhei@gmail.com> PR-URL: https://github.com/nodejs/node/pull/58178 Fixes: https://github.com/nodejs/node/issues/58140 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/58178 Fixes: https://github.com/nodejs/node/issues/58140 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 05 May 2025 08:46:23 GMT ✔ Approvals: 2 ✔ - Paolo Insogna (@ShogunPanda) (TSC): https://github.com/nodejs/node/pull/58178#pullrequestreview-2829062997 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/58178#pullrequestreview-2829334728 ✘ Last GitHub CI failed ℹ Last Full PR CI on 2025-05-09T18:21:27Z: https://ci.nodejs.org/job/node-test-pull-request/66736/ - Querying data for job/node-test-pull-request/66736/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/14936022305 |
Sorry, something went wrong.
|
@islandryu Can you please fix failing test so we can move this forward? |
Sorry, something went wrong.
|
@ShogunPanda Separately, I used to be able to view the Jenkins results until recently, but now I’m getting a permission error and can no longer access them. |
Sorry, something went wrong.
|
CI is under security embargo. |
Sorry, something went wrong.
|
No worries, let's wait for the other PR to land and then you can rebase this. About your question, maybe @nodejs/build-infra has some idea? |
Sorry, something went wrong.
Sorry, something went wrong.
|
Thank you very much for fixing this! |
Sorry, something went wrong.
| if (responseBuffer.includes('\r\n\r\n')) { | ||
| const statusLine = responseBuffer.split('\r\n')[0]; | ||
| const status = statusLine.split(' ')[1]; | ||
| assert.strictEqual(status, '404'); |
There was a problem hiding this comment.
This has been flaking the CI for over a month #59577
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes: #58140
As shown in the test code, sending an empty line after a request can result in a state where the keep-alive timer is reset, but neither requestTimeout nor keepAliveTimeout is active.
Unless a custom timeout is implemented, this allows the client to hold the socket indefinitely.
Modified behavior so that data like an empty line, which does not indicate the start of an HTTP message, no longer resets the keep-alive timeout.
FYI
Here is the behavior of other HTTP servers:
nginx: When client_header_timeout is set, sending an empty line after a request triggers a 408 timeout response once the timeout period expires.
Apache: When RequestReadTimeout header=5-10,MinRate=500 is configured, the connection times out after the specified duration, but no error code is sent.
However, since the timing for resetting the keep-alive timeout is not clearly defined in RFC 9112 or similar specifications, I believe this change is appropriate.