-
-
Notifications
You must be signed in to change notification settings - Fork 968
Open
Labels
Description
What problem are you trying to solve?
Safely retrieve content delivered from a server.
Describe the feature
Depending on how the stream is sent from the server, got will happily complete without error, even if the actual bytes transferred does not match the value in the content-length
header.
While it is possible to workaround, and detect manually, it is quite cumbersome, especially if decompress
is enabled.
FYI, it is not a problem when the server responds with content-encoding: chunked
, since node will error if such a stream is interrupted.
Checklist
- I have read the documentation and made sure this feature doesn't already exist.
szmarczak