Dominick Navarro
Dominick Navarro

Reputation: 752

Error 413 in websocket, how to handle?

I have been developing a websocket server until recently I have encountered a 413 Entity too large error. I am using ratchetphp on my server. Have anyone encountered this? Is there anything I can do so that this won't occur? If there isn't anything I can do please help me recreate this error, the current solution I have on fixing this is clearing my browser's cache. I only find this error out by checking network tab on developer tools using chrome, but if clients connect to the server without knowledge of developer tools how can I let them know that they need to clear their cache?

Upvotes: 3

Views: 1290

Answers (2)

Konrad Chrzanowski
Konrad Chrzanowski

Reputation: 11

I've been struggling with same problem and the solution was rather trivial : Deleting cookies in my browser (Google Chrome).

Upvotes: 1

Dominick Navarro
Dominick Navarro

Reputation: 752

After hours of reading codes inside ratchetphp library I have found out that http connection upgrade header is limited to 4kb of data. So all I did to solve this is to increase the limit.

If you also encounter this error, see file

Ratchet/Http/HttpRequestParser.php

Hope this helps

Upvotes: 5

Related Questions