Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Commented Issue: http_listener - read_to_end on request body into file stream hangs [325]

$
0
0
Reported from the following discussion:

http://casablanca.codeplex.com/discussions/573976#post1328648

I am able to reproduce on Ubuntu 64bit debug as well, see my forked repository in branch read_to_end_block. This is not an issue on Windows desktop.

https://casablanca.codeplex.com/SourceControl/network/forks/stevetgates/stgatesdev/changeset/76fb4220ec6715db393b7b729c948dee8c114c1d

Comments: Actually, just closing the streambuf underlying the request.body() for writing makes this successful: ``` stdio_ostream<char> buffer(std::cout); request.body().read_to_end(buffer.streambuf()).then([=](auto read) { request.reply(status_codes::OK); }); request.content_ready().then([=](auto req) { request.body().streambuf().close(std::ios_base::out); }); ``` Is there a reason the streambuf isn't closed for writing on completion internal to the server implementation when calling _complete?

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>