Fix buffer to string conversion escaping vertical white space

This commit is contained in:
Miguel Portilla
2016-04-29 16:26:49 -04:00
committed by Vinnie Falco
parent c28d36b500
commit a1951aff02

View File

@@ -430,15 +430,10 @@ buffers_to_string(ConstBufferSequence const& bs)
for(auto const& b : bs)
s.append(buffer_cast<char const*>(b),
buffer_size(b));
for(auto i = s.size(); i-- > 0;)
if(s[i] == '\r')
s.replace(i, 1, "\\r");
else if(s[i] == '\n')
s.replace(i, 1, "\\n\n");
return s;
}
// Run as a couroutine.
// Run as a coroutine.
void
ServerHandlerImp::processSession (std::shared_ptr<Session> const& session,
std::shared_ptr<JobCoro> jobCoro)