Closed martapanc closed 3 years ago
Thanks for pointing out the issue and providing a fix :) I didn't know this could be a problem. What you suggest seems pretty solid. I'll update the code with your solution since this is too tiny a "project" for a PR :p
Awesome, glad I was able to help! :)
Hi, I'm using part your code for a personal project, and it works like a charm except for a small issue I found.
Essentially, the mjpeg stream I'm reading from uses a slightly different header for some reason:
Content-Length
instead ofContent-length
. No idea how widespread this issue is, but since the solution appears to be very simple I thought to report it to you, so maybe I can save other users some debugging time 😁My solution was simply to change the
CONTENT_LENGTH
const to beand then do like
inside the
getLength
function, so that it works regardless of the wording. Let me know what you think of it :)Cheers, Marta