summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-08-07 21:24:39 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-08-07 21:24:39 +0200
commitcfad3bb5427fc10ad305778b60d5385ed1cc954d (patch)
tree93ab42d8deb4cda33af95c0794059c9def38b920 /src
parentd127f4381fcea62e1f7f2fbd195ae7dc058500e8 (diff)
Make sure HttpProtocol doesn't print content twice in case of error
If write() was called with last = true and then error was called you would end up with the data written twice
Diffstat (limited to 'src')
-rw-r--r--src/http_protocol.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http_protocol.cc b/src/http_protocol.cc
index 6d73502..ad81050 100644
--- a/src/http_protocol.cc
+++ b/src/http_protocol.cc
@@ -304,6 +304,7 @@ public:
if (last) {
HexDump::write(text_, HexDump::ADDRESS | HexDump::CHARS, buffer_.data(),
0, buffer_.size());
+ buffer_.clear();
}
}