Hello,--
Just been playing with Civet - thanks for this!
I've manged to embed it in a C++ test app, & return non-binary content. I'm struggling with trying to return binay data via the conn handler:
const char mime[] = "video/MP2T";
mg_send_mime_file(conn, test_file, mime);
my test_file is simply an mpeg2-ts file, which is part of a valis m3u8 (HLS) playlist. I can post Wireshark captures of the HTTP headers from Apache and from Civet (the former works, the latter doesn't), but before I do, is there anything else I should set, or is there another way I should do this? I can't find any examples of using mg_send_mime_file().
Thanks!
Sourceforge
https://sourceforge.net/projects/civetweb/
---
You received this message because you are subscribed to the Google Groups "civetweb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to civetweb+unsubscribe@googlegroups.com.
To post to this group, send email to cive...@googlegroups.com.
Visit this group at https://groups.google.com/group/civetweb.
To view this discussion on the web visit https://groups.google.com/d/msgid/civetweb/9e5bfaf4-3170-4561-838f-1a21b80e4154%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
An example for mg_send_mime_file is here:Using NULL as the last argument will automatically determine the mime type from the file ending, otherwise it will return the file type you specified (in handle_static_file_request). The automatic detection of the mime type will use a list of known file endings (https://github.com/civetweb/civetweb/blob/master/src/civetweb.c#L5348). This list can be extended using the extra_mime_types configuration options. If you always have the same file ending, this might be the easiest option. I do not know the "video/MP2T" mime type - could it be "video/mpeg" or "video/mp4" - I'm not an expert on video types.
https://github.com/civetweb/civetweb/blob/master/src/civetweb.c#L7060
On Tue, Aug 16, 2016 at 12:53 PM, Tim Stevens <tim.s....@bt.com> wrote:
Hello,
Just been playing with Civet - thanks for this!
I've manged to embed it in a C++ test app, & return non-binary content. I'm struggling with trying to return binay data via the conn handler:
const char mime[] = "video/MP2T";
mg_send_mime_file(conn, test_file, mime);
my test_file is simply an mpeg2-ts file, which is part of a valis m3u8 (HLS) playlist. I can post Wireshark captures of the HTTP headers from Apache and from Civet (the former works, the latter doesn't), but before I do, is there anything else I should set, or is there another way I should do this? I can't find any examples of using mg_send_mime_file().
Thanks!
--
Sourceforge
https://sourceforge.net/projects/civetweb/
---
You received this message because you are subscribed to the Google Groups "civetweb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to civetweb+u...@googlegroups.com.