Boost logo

Boost Users :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2020-12-11 19:15:03


> I'm fairly sure it's user-error, but it's not easy to figure out for a Beast novice like myself. --DD

Your response is 200 OK, but you aren't setting Content-Length: 0.
Under HTTP rules this means that the end of the body is indicated by
an end of file. The documentation for need_eof explains this:

<https://www.boost.org/doc/libs/1_74_0/libs/beast/doc/html/beast/ref/boost__beast__http__message/need_eof.html>

See: "* has_content_length would return true."

For your message, has_content_length() would return false (since you
aren't setting it). Try adding:

    res.content_length( 0 );

or

    res.prepare_payload();

Thanks


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net