konteck / wpp

Single file embedded C++ web server
http://konteck.github.com/wpp
93 stars 47 forks source link

Set body length in HTTP response using string::size(). #15

Open mmp opened 8 years ago

mmp commented 8 years ago

Using strlen() on the contents of a std::string gives an incorrect result if the body is binary data with 0 bytes along the way (e.g. an image).