Open MatthewBergsma opened 11 years ago
we can also infer that we reached a boundary if we find a Content-Type string
check: https://github.com/wilhelmbot/Paparazzo.js/blob/master/src/paparazzo.coffee#L111
Hmmm... My streams do have a content type of image/jpeg. I'll look through and see where the script might be "caching" the request too early.
Currently the node JS service just serves up a broken image.
For what it's worth, I had problems with a Panasonic camera. It was reporting it could not determine the next image. I found my data stream did not include Content-Length. It did have Content-Type BUT it was actually Content-type (lowercase t) so I had to modify the js to make it work.
good point @AaronHorn
we could fix the regular expression by adding "i" at the end
/Content-Type:\s+image\/jpeg\s+/i
letting us ignore case:
content-type: image/jpeg Content-Type: image/jpeg cOntent-TYPE: image/jpeg
would you mind sharing a fix?
I've got a few mjpg streams coming from a desktop app (evocam) - and they aren't being scraped correctly by the node process.
After debugging a bit I noticed that the app is not setting a content-length header for each frame of the mjpg stream.
Do you have any insights into a way to modify paparazzo to support this use case? I'm not quite sure how to successfully open and close the request without knowing the total size of the object being requested...