Commit graph

3 commits

Author SHA1 Message Date
Marco Ippolito
fef180c8a2
http: coerce content-length to number
PR-URL: https://github.com/nodejs/node/pull/57458
Fixes: https://github.com/nodejs/node/issues/57456
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-03-16 12:28:49 +00:00
Robert Nagy
9e1824d94e
http: correctly calculate strict content length
Fixes some logical errors related to strict content length.

Also, previously Buffer.byteLength (which is slow) was run regardless of
whether or not the len was required.

PR-URL: https://github.com/nodejs/node/pull/46601
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-02-23 09:54:45 +00:00
sidwebworks
91020db933
http: throw error on content-length mismatch
PR-URL: https://github.com/nodejs/node/pull/44378
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2022-09-18 12:39:37 +02:00