Fabio R. Sluzala
Fabio R. Sluzala
I think it may happen, the problem I described in this comment seens to be related: https://github.com/pistacheio/pistache/issues/59#issuecomment-894811198
I think this is very useful, I did a pull request: #1085
Hi. Thank you! I think your observations are good, I was trying to make similar to the Pistache::Tcp::Peer code https://github.com/pistacheio/pistache/blob/master/include/pistache/peer.h#L54 I am not sure how to proceed is this case.
I was testing more and polling the socket seens to be more reliable than checking the error code: ``` static int pollSocket(int fd) { pollfd pfd[] = {{fd, POLLIN, 0}};...
> I am using the ResponseStream to report events to the api client with EventSource implementation, if the client disconnects I should return the route to reduce resource usage. This...
I did a test here with a multipart form sending a 160KB zero-filled file and it seems ok, the non-text binary seems ok in the body.  Saving the body...
@romange thanks for your fast response! It seems to me that is a race condition, I haven't enough time to study the project architecture and debug, but I am available...
@dranikpg Thanks! I don't know if it will help, but follows this test log. ``` [ctest] [ RUN ] ListFamilyTest.TwoQueueBug [ctest] I20221103 23:03:50.877496 62328 proactor_pool.cc:66] Running 4 io threads [ctest]...
> @Fabio3rs can you please check out branch Bug451 and see if you can reproduce the crash? > > Thanks! Thanks! I can't reproduce the crash and all the tests...
I think this should work: ```cpp std::string filename = "myfile.csv"; using namespace Pistache::Http; response.headers().addRaw(Header::Raw{ "Content-Disposition", "attachment; filename=" + filename + ";"}); Pistache::Http::serveFile(response, filename, Pistache::Http::Mime::MediaType("text/csv")); ``` If it doesn't work, maybe...