kenba / via-httplib

A library for embedding an HTTP or HTTPS server in C++ applications.
Boost Software License 1.0
46 stars 15 forks source link

MAX_HEADER_NUMBER and MAX_HEADER_LENGTH not used in message_headers class #23

Closed kenba closed 1 year ago

kenba commented 1 year ago

When the message_headers class was changed to take template parameters, the parse function was not updated.
This effectively fixes MAX_HEADER_NUMBER to 8 and MAX_HEADER_LENGTH to 1024.

kenba commented 1 year ago

The tests in test_headers.cpp for these template parameters were incorrect: they did not have a complete multiple header string so they fail regardless of the template parameters. Also, InValidMultipleHeaderString2 accepted 100 headers, not one!

kenba commented 1 year ago

I searched for other places where parser template parameters were not being used correctly but didn't find any, just a typo for "consectutive".

The fix has been delivered in tag 1.10.1.