id summary reporter owner description type status milestone component version severity resolution keywords cc 12875 ip::tcp::iostream flush() doesn't clear the buffer. Neither does clear(); ericrsoldan@… chris_kohlhoff "Code something like the below shows the issue: std::string postData = ""This is my post data.""; ip::tcp::iostream stream; stream.expires_from_now(boost::posix_time::seconds(10)); stream.connect(""192.168.1.128"", ""http""); stream << ""POST /myRestfulPath HTTP/1.1\r\n""; stream << ""Content-Type: application/x-www-form-urlencoded\r\n""; stream << ""Host: 192.168.1.128:8080\r\n""; stream << ""Content-Length: "" << postData.size() << ""\r\n""; stream << ""Connection: Close\r\n\r\n""; stream.flush(); stream << postData.c_str(); stream.flush(); Using Wireshark, the headers show up with the first flush, but also show up from the second, with the postData appended. I understand that I do not need the first flush in this example. However, the server requires an ""Expect: 100-Continue"" so therefore I need to send before the postData, and then receive the ""Continue"", and then send the postData. (Not shown.) stream.clear() doesn't clear what flush left behind, either. " Bugs new To Be Determined asio Boost 1.63.0 Problem tcp iostream flush clear