mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-20 14:02:38 +02:00
HTTPSession: always reset buffer pointers on connect to clear any leftover data from previous requests
This commit is contained in:
@@ -197,6 +197,9 @@ void HTTPSession::connect(const SocketAddress& address)
|
||||
_socket.connect(address, _timeout);
|
||||
_socket.setReceiveTimeout(_timeout);
|
||||
_socket.setNoDelay(true);
|
||||
// There may be leftover data from a previous (failed) request in the buffer,
|
||||
// so we clear it.
|
||||
_pCurrent = _pEnd = _pBuffer;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user