nodejs / http-parser

http request/response parser for c
MIT License
6.32k stars 1.53k forks source link

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

Closed sarenameas closed 4 years ago

sarenameas commented 4 years ago

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 commented 4 years ago

Could you confirm this is expected and update the documentation?

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

sarenameas commented 4 years ago

Could you confirm this is expected and update the documentation?

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

Thanks!!