-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant stream MJPEG with multipart/x-mixed-replace #1207
Comments
I also created simple flask streaming scirpt, which works as expected(showing mjpeg stream in browsers).
I tried to analyze the difference in responses between Flask and Pistache. Here is Flask with curl:
I wanted to see the body of request, so I replaced image with shorter string:
I noticed that Flask sends response with "chunked" encoding. So through Pistache docs I wrote new function:
here is curl:
Everything looks the same as a Flask output, in structure. Except with |
Well, I couldnt make it work. As previous person who had similar issue, I decided to switch to Asio, which worked as expected. To me it feels like there is some issue with library with multipart, or would be nice to have a code example with multipart streaming. I liked modern Pistache interface, but it didnt worked out for me as expected. |
I created server that supposed to provide MJPEG stream to browser.
Here is implementation:
Its based a lot on https://stackoverflow.com/questions/54869598/c-pistache-and-mjpeg-server, #466
Problem with it, it doesnt work,
LOG("Pistache: Starting frameServeImpl");
is printed, andLOG("Pistache: callback for camera {}", cameraId);
is not printed, although execution reaches "send" inside of lambda. Curl for this call print this:The text was updated successfully, but these errors were encountered: