A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
MIT License
2.62k
stars
758
forks
source link
Client is not reading complete response if neither Conten-Length nor Transfer-Encoding are set in header #112
I am trying to access a HTTP server which is responding with HTTP 1.1.
The client is not returning the full response from the server.
The options "Content-Lenght" and "Transfer-Encoding" are NOT present in the server's responses. But the option "Connection : close" is present.
As I understand HTTP the option "Connection : close" should be enough to tell the client to read everything until the connection is closed by the server and treat all this data as part of the response.
If I insert the following code in std::shared_ptr<Response> request_read() everything works fine:
I am trying to access a HTTP server which is responding with HTTP 1.1.
The client is not returning the full response from the server.
The options "Content-Lenght" and "Transfer-Encoding" are NOT present in the server's responses. But the option "Connection : close" is present. As I understand HTTP the option "Connection : close" should be enough to tell the client to read everything until the connection is closed by the server and treat all this data as part of the response.
If I insert the following code in
std::shared_ptr<Response> request_read()
everything works fine: