Allow duplicated Content-Length with the same value#460
Allow duplicated Content-Length with the same value#460obatysh wants to merge 2 commits intonodejs:mainfrom
Conversation
|
Hello! Thank you for submitting this patch. Wouldn't allowing duplicate content-length header be a violation of protocol specification? |
|
RFC https://tools.ietf.org/html/rfc7230#page-31 says that duplicate Content-Length fields with the same decimal value can be either rejected as invalid or accepted by replacing duplicate with a single valid Content-Length field. So, it is not a violation, it is one of the possible options. |
|
Good point! I'd love to hear opinion of @nodejs/http on that? Would we prefer to reject it or parse it? |
|
it's worth noting that this costs an additional 8 bytes per |
|
Yes. That means it breaks ABI and can't land in a v2.x release. See discussion in #435. |
No description provided.