Mohammad Nejati
Mohammad Nejati
> `file_body` can do exactly what you say If I understand correctly, they want to use `boost::asio::stream_file` and perform the write operation asynchronously.
Thanks , It seems it works properly , but at the end it have some error . My CPU : Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Testing 2nd order Costas...
Calling [basic_stream::expires_after](https://www.boost.org/doc/libs/1_85_0/libs/beast/doc/html/beast/ref/boost__beast__basic_stream/expires_after.html) while there is a pending write operation, does not update the write timer: https://github.com/boostorg/beast/blob/develop/include/boost/beast/core/impl/basic_stream.hpp#L814 Because of `response_queue_` every time you call `expires_after` (except the first time) there is...
An easy fix would be to call `expires_after` before initiating the write operation, as that is the only place where you can be confident that there is no pending write...
The reason you can't update the write timer while it is pending is because it has already initiated an `async_wait` operation on that timer (with whatever timeout value was set)....
This is a known issue with some of the web servers in the wild; they don't perform a proper SSL shutdown procedure and close the TCP socket unexpectedly. For example,...
@EelisVP In client mode, `http::read(stream, buffer, res, myec)` should complete successfully. The `net::ssl::error::stream_truncated` error only occurs during the call to `stream.shutdown(ec)`. What type of response body are you using? Could...
It seems you successfully get a response from the server, but it is just empty. Note that the target in the `wget --no-check-certificate -q -O - https://localhost:51733` command is empty,...
Does `http::read(stream, buffer, res, myec)` complete without any errors, or are you getting `net::ssl::error::stream_truncated` on that line? Could you try setting `req.keep_alive(true);`?
It seems we need to manually set the end of stream when parser completes with `ssl::error::stream_truncated` error, this should work: ```cpp http::response_parser p; beast::error_code ec; http::read(stream, buffer, p, ec); if(ec...