mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix buffer to string conversion escaping vertical white space
This commit is contained in:
committed by
Vinnie Falco
parent
c28d36b500
commit
a1951aff02
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user