-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
Node.js abort the response if the body length do not match "Content-Length" during 304 #31037
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
http
Issues or PRs related to the http subsystem.
Comments
I just added a listener to the "aborted" event, to show that in both Node 12 and 13, the request is aborted prematurely |
/cc @nodejs/http |
Hello, I found a way to fix this issue. I'll be able to open a PR in the next few days, I still need to come up with a working test :) |
4 tasks
joesepi
pushed a commit
to joesepi/node
that referenced
this issue
Jan 8, 2021
Fixes: nodejs#31037 PR-URL: nodejs#34835 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Hey 👋
Since the version 13 of Node.js, the response is aborted if the
Content-Length
isn't matched in the body when sending back a 304.According to the HTTP spec, we have the right to provide a
Content-Length
header.Reproduction:
Logs in Node 12:
Logs in Node 13:
c/c @targos
The text was updated successfully, but these errors were encountered: