Logs:
OnWrite(): bytes_transferred=343
OnRead(): bytes_transferred=0
OnRead(): Recv:
HTTP/1.1 200 OK
fail(): OnRead: short read
I am getting short read errors while performing beast::http::async_read operation.
Basically, first I perform async_write operation to send data to server. Then to read that data, I am performing async_read operation.
As the logs suggest, no bytes are read in async_read, resulting in short read error. But I wanted to understand why could it happen?
In async_read,
- Buffer used: beast::flat_buffer
- response message used: beast::http::response, I am also clearing the response message in async_read callback.