Unverified Commit dc0152bc authored by Veggie Monster's avatar Veggie Monster Committed by GitHub
Browse files

Merge pull request #17 from equalitie/fetch-end-of-stream

Ignore end_of_stream error when fetching a http page
I tested and the patch resolves the issue now I get 200 and the correct body from the client.
parents 25246ff5 3e1da88b
......@@ -23,6 +23,13 @@ fetch_http_page( asio::io_service& ios
// Send the HTTP request to the remote host
http::async_write(con, req, yield[ec]);
// Ignore end_of_stream error, there may still be data in the receive
// buffer we can read.
if (ec == http::error::end_of_stream) {
ec = sys::error_code();
if (ec) return or_throw(yield, ec, move(res));
beast::flat_buffer buffer;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment