write headers to the response
This commit is contained in:
parent
74cc6b815a
commit
15fa328a65
@ -116,6 +116,10 @@ namespace ix
|
|||||||
// Write headers
|
// Write headers
|
||||||
ss.str("");
|
ss.str("");
|
||||||
ss << "Content-Length: " << response->payload.size() << "\r\n";
|
ss << "Content-Length: " << response->payload.size() << "\r\n";
|
||||||
|
for (auto&& it : response->headers)
|
||||||
|
{
|
||||||
|
ss << it.first << ": " << it.second << "\r\n";
|
||||||
|
}
|
||||||
ss << "\r\n";
|
ss << "\r\n";
|
||||||
|
|
||||||
if (!socket->writeBytes(ss.str(), nullptr))
|
if (!socket->writeBytes(ss.str(), nullptr))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user