mjpg-streamer icon indicating copy to clipboard operation
mjpg-streamer copied to clipboard

403: Forbidden! frame already sent

Open djkraven opened this issue 6 years ago • 7 comments

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.

djkraven avatar Sep 02 '18 14:09 djkraven

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.

djkraven avatar Sep 20 '18 14:09 djkraven

Does anyone have suggestions on this issue?

djkraven avatar Oct 19 '18 17:10 djkraven

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.

jacksonliam avatar Oct 19 '18 20:10 jacksonliam

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.

djkraven avatar Oct 24 '18 15:10 djkraven

Works for me too when streaming through NAT

schiffsratte avatar Jun 27 '20 19:06 schiffsratte

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

LMBernardo avatar Sep 04 '22 17:09 LMBernardo

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.

LMBernardo avatar Sep 04 '22 22:09 LMBernardo