wsd: http: use writeData to serialize http::Request
Change-Id: Ib67f92c34d42d7cdb922cbfc47222040a6deb603 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
parent
40b1aa1077
commit
4bda1ff1d1
1 changed files with 11 additions and 7 deletions
|
@ -490,14 +490,18 @@ public:
|
|||
{
|
||||
if (_stage == Stage::Header)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << getVerb() << ' ' << getUrl() << ' ' << getVersion() << "\r\n";
|
||||
_header.serialize(oss);
|
||||
oss << "\r\n";
|
||||
const std::string headerStr = oss.str();
|
||||
LOG_TRC("performWrites (header).");
|
||||
|
||||
out.append(getVerb());
|
||||
out.append(' ');
|
||||
out.append(getUrl());
|
||||
out.append(' ');
|
||||
out.append(getVersion());
|
||||
out.append("\r\n", 2);
|
||||
|
||||
_header.writeData(out);
|
||||
out.append("\r\n", 2);
|
||||
|
||||
out.append(headerStr.data(), headerStr.size());
|
||||
LOG_TRC("performWrites (header): " << headerStr.size() << ": " << headerStr);
|
||||
_stage = Stage::Body;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue