Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Documentation update request: (0 if no Content-Length header) is incorrect #512

Closed
sarenameas opened this issue May 8, 2020 · 2 comments · Fixed by #513
Closed

Documentation update request: (0 if no Content-Length header) is incorrect #512

sarenameas opened this issue May 8, 2020 · 2 comments · Fixed by #513

Comments

@sarenameas
Copy link

Hello,

In https://github.com/nodejs/http-parser/blob/master/http_parser.h#L309 the content_length states the following:

uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */

This is not true in the latest version. I checked the content_length after the response has finished, and if there is no Content-Length header, this remains as ULLONGMAX. Could you confirm this is expected and update the documentation?

bnoordhuis added a commit to bnoordhuis/http-parser that referenced this issue May 8, 2020
It's -1 when no Content-Length field is present, not 0.

Fixes: nodejs#512
@bnoordhuis
Copy link
Member

Could you confirm this is expected and update the documentation?

Yes, that's expected. I've opened #513.

@sarenameas
Copy link
Author

Could you confirm this is expected and update the documentation?

Yes, that's expected. I've opened #513.

Thanks!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants