From cfad3bb5427fc10ad305778b60d5385ed1cc954d Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 7 Aug 2017 21:24:39 +0200 Subject: 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 --- src/http_protocol.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/http_protocol.cc') 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(); } } -- cgit v1.2.3-70-g09d2