Adjusts the line terminator in the RuleMessage::m_buf variable

This commit is contained in:
Felipe Zimmerle
2017-03-08 18:02:40 -03:00
parent 5537951993
commit ef35ffa13e

View File

@@ -1475,7 +1475,7 @@ std::string Transaction::toBuf() {
a.append(m_uri); a.append(m_uri);
a.append(" HTTP/"); a.append(" HTTP/");
a.append(m_httpVersion); a.append(m_httpVersion);
a.append("\n"); a.append("\r\n");
std::vector<const collection::Variable *> l; std::vector<const collection::Variable *> l;
m_variableRequestHeaders.resolve(&l); m_variableRequestHeaders.resolve(&l);
for (auto h : l) { for (auto h : l) {
@@ -1483,12 +1483,13 @@ std::string Transaction::toBuf() {
a.append((h->m_key->c_str() + pos)); a.append((h->m_key->c_str() + pos));
a.append(": "); a.append(": ");
a.append((h->m_value->c_str())); a.append((h->m_value->c_str()));
a.append("\r\n");
} }
a.append("\n\n"); a.append("\r\n\r\n");
if (this->m_requestBody.str().length() > 0) { if (this->m_requestBody.str().length() > 0) {
a.append(this->m_requestBody.str().c_str()); a.append(this->m_requestBody.str().c_str());
a.append("\n\n"); a.append("\r\n\r\n");
} }
#if 0 #if 0
l.clear(); l.clear();