Commit b6e93e05 authored by Davis King's avatar Davis King

Applied Steven Van Ingelgem's http server patch to trim inappropriate whitespace

from the headers field.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402995
parent 1dd9e4dc
......@@ -249,11 +249,11 @@ namespace dlib
position_of_double_point = line.find_first_of(':');
if ( position_of_double_point != string::npos )
{
first_part_of_header = line.substr(0, position_of_double_point);
first_part_of_header = dlib::trim(line.substr(0, position_of_double_point));
if ( !incoming_headers[first_part_of_header].empty() )
incoming_headers[ first_part_of_header ] += " ";
incoming_headers[first_part_of_header] += line.substr(position_of_double_point+1);
incoming_headers[first_part_of_header] += dlib::trim(line.substr(position_of_double_point+1));
// look for Content-Type:
if (line.size() > 14 && strings_equal_ignore_case(line, "Content-Type:", 13))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment