scottlamb / multipart-stream-rs

Rust library to parse and serialize async multipart/x-mixed-replace streams.
https://crates.io/crates/multipart-stream
Apache License 2.0
10 stars 8 forks source link

feat(parser): infer Content-Length when missing #3

Open grasevski opened 1 year ago

grasevski commented 1 year ago

Some cameras have mjpeg streams which do not write Content-Length in each part. This code searches for the boundary marker when Content-Length is missing, in order to infer the length.

zanna-37 commented 11 months ago

@scottlamb I second this pull request. Can this be reviewed and eventually merged? Thank you.

grasevski commented 11 months ago

I ended up writing my own parsing code: https://gist.github.com/grasevski/a7238b5f3775605253b8e73ea2a8d5f2

Feel free to copy/paste, if it helps.