mjpg-streamer
mjpg-streamer copied to clipboard
403: Forbidden! frame already sent
What be the cause for getting this error when a browser one machine is streaming the cam without issue but other machines the error. Multiple reloads the other machines will eventually start streaming.
This seems to be a problem when viewing the cam over the internet from a NAT address on several different machines and the check_client_status using IP as the unique client indicator. I originally had the cam running on a RaspberryPi without this issue. Now it is on a netbook with LinuxMint 19 32b. I have cams on a LinuxMint 64b and when viewing internally on another machine with multiple browsers and duplicate tabs this error does not occur.
Does anyone have suggestions on this issue?
I'm not sure what the code is for, perhaps some kind of denial of service protection?
Try changing https://github.com/jacksonliam/mjpg-streamer/blob/f387bb44e6c087271b763b27da998bf2e06c4f5d/mjpg-streamer-experimental/plugins/output_http/httpd.c#L375
To return 0
and re-building.
I have tested with a 64b machine and this seems to help avoid the error and keeping streams fluid. Need to do it on a 32b machine to fully confirm. Thank you for the pointer of what to change.
Works for me too when streaming through NAT
Does anyone have any idea why this would be desirable? It seems sort of pointless - and definitely worth a PR imo. Specifically, removing the various checks such as the one at https://github.com/jacksonliam/mjpg-streamer/blob/85f89a8c321e799fabb1693c5d133f3fb48ee748/mjpg-streamer-experimental/plugins/output_http/httpd.c#L1071
HTTP rate limiting (i.e., "403: Forbidden! frame already sent") is now disabled by default in my fork, where it is now an optional command line parameter.