-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: added aborted property to request #20094
Conversation
Two notes:
|
Yes, this basically makes |
I'm not sure it's worth the overhead of the |
@mscdex: Just following how |
doc/api/http.md
Outdated
@@ -1288,6 +1288,14 @@ the server, then sockets are destroyed when they time out. If a handler is | |||
assigned to the request, the response, or the server's `'timeout'` events, | |||
timed out sockets must be handled explicitly. | |||
|
|||
### response.aborted | |||
<!-- YAML | |||
added: v10.0.0 |
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.
This should be added: REPLACEME
. The actual version will then be substituted by the releaser when the change first lands in a release.
50fe188
to
4c3fe2d
Compare
Related: 8ad8157 |
8369a98
to
32ee7d5
Compare
@nodejs/http |
IMHO that could/should be changed to a boolean as well. |
@ronag is there anything I can help, so it is easier for you to add a test as well? Without a test this PR can not land. Since this has come up in a couple PRs you opened, it would be great to know if there is anything preventing you from writing tests / if there is anything that would help you further. |
@BridgeAR It takes several minutes to run the tests using the command |
|
@richardlau: yep, following those instructions, it takes 10 minutes to run. I can do:
But I still need to rebuild the entire thing as soon as I change anything in I would like to be able to do something like:
Which will auto run whenever I change anything in |
314d6fd
to
9ffe99b
Compare
You can run a single test or multiple ones with When changing a test you do not have to rebuild the executable. When changing any Doing a minor change after having a up to date build should not take long though. Only the touched files are going to be rebuild and that does not take long (on my machine a couple seconds).
I hope my hints help you already to reduce that overhead. We all have limited time and most collaborators also work on Node.js in their spare time. So we all must go through the same procedure. |
@BridgeAR ah, I shouldn't do Workflow: make -j8
python tools/test.py -J --mode=release parallel/test-stream2-* |
Notable Changes: * console: - make console.table() use colored inspect (TSUYUSATO Kitsune) #20510 * fs: - move fs/promises to fs.promises (cjihrig) #20504 * http: - added aborted property to request (Robert Nagy) #20094 * n-api: - initialize a module via a special symbol (Gabriel Schulhof) #20161 * src: - add public API to expose the main V8 Platform (Allen Yonghuang Wang) #20447 PR-URL: #20606
Notable Changes: * console: - make console.table() use colored inspect (TSUYUSATO Kitsune) #20510 * fs: - move fs/promises to fs.promises (cjihrig) #20504 * http: - added aborted property to request (Robert Nagy) #20094 * n-api: - initialize a module via a special symbol (Gabriel Schulhof) #20161 * src: - add public API to expose the main V8 Platform (Allen Yonghuang Wang) #20447 PR-URL: #20606
Notable Changes: * console: - make console.table() use colored inspect (TSUYUSATO Kitsune) #20510 * fs: - move fs/promises to fs.promises (cjihrig) #20504 * http: - added aborted property to request (Robert Nagy) #20094 * n-api: - initialize a module via a special symbol (Gabriel Schulhof) #20161 * src: - add public API to expose the main V8 Platform (Allen Yonghuang Wang) #20447 PR-URL: #20606
PR-URL: nodejs#20094 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#20094 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#20094 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#20094 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Backport-PR-URL: #22850 PR-URL: #20094 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Notable changes: * **assert**: - backport some assert commits (Ruben Bridgewater) [#23223](#23223) * **deps**: - V8: cherry-pick 64-bit hash seed commits (Yang Guo) [#23274](#23274) * **http**: - added aborted property to request (Robert Nagy) [#20094](#20094) * **http2**: - backport http2 changes from 10.x (Kelvin Jin) [#22850](#22850) PR-URL: #23974
Notable changes: * **assert**: - backport some assert commits (Ruben Bridgewater) [#23223](#23223) * **deps**: - upgrade to libuv 1.23.2 (cjihrig) [#23336](#23336) - V8: cherry-pick 64-bit hash seed commits (Yang Guo) [#23274](#23274) * **http**: - added aborted property to request (Robert Nagy) [#20094](#20094) * **http2**: - graduate from experimental (James M Snell) [#22466](#22466) PR-URL: #23974
Notable changes: * **assert**: - backport some assert commits (Ruben Bridgewater) [#23223](#23223) * **deps**: - upgrade to libuv 1.23.2 (cjihrig) [#23336](#23336) - V8: cherry-pick 64-bit hash seed commits (Yang Guo) [#23274](#23274) * **http**: - added aborted property to request (Robert Nagy) [#20094](#20094) * **http2**: - graduate from experimental (James M Snell) [#22466](#22466) PR-URL: #23974
Notable changes: * **assert**: - backport some assert commits (Ruben Bridgewater) [nodejs#23223](nodejs#23223) * **deps**: - upgrade to libuv 1.23.2 (cjihrig) [nodejs#23336](nodejs#23336) - V8: cherry-pick 64-bit hash seed commits (Yang Guo) [nodejs#23274](nodejs#23274) * **http**: - added aborted property to request (Robert Nagy) [nodejs#20094](nodejs#20094) * **http2**: - graduate from experimental (James M Snell) [nodejs#22466](nodejs#22466) PR-URL: nodejs#23974
Added an
aborted
property to the request object. Currently, it is not possible to query whether aclose
event was emitted due to client side socket close without also listening toaborted
.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes