elnormous / HTTPRequest

Single-header C++ HTTP request class
The Unlicense
942 stars 213 forks source link

Message headers are case-insensitive #48

Closed tysenmoore-xse closed 3 years ago

tysenmoore-xse commented 3 years ago

According to RFC 2616 the Message Headers are case-insensitive (stated as: "Field names are case-insensitive"). However, your code is checking for "Content-Length" and "Transfer-Encoding" in a case sensitive manner so it does not process the response for some web servers. Any chance this can be modified? If a PR is better I can provide one.

elnormous commented 3 years ago

Thank you! Fixed in https://github.com/elnormous/HTTPRequest/commit/e2863f8cb331bdd89534dda8b4af2d30e9f2e033.