mattgodbolt / seasocks

Simple, small, C++ embeddable webserver with WebSockets support
BSD 2-Clause "Simplified" License
724 stars 120 forks source link

Handle non-numeric Content-Length header #164

Closed eriklee closed 2 years ago

eriklee commented 2 years ago

Thanks for a great library! I'm using it in a few applications at work and getting crashes due to internal vulnerability scans looking for exploitable applications using log4j. Returning 0 seems sensible as it's being done in the other failure cases here.

Allow non-numeric or overly large header values for Content-Length, returning 0 instead.