voryx / Thruway

PHP Client and Router Library for Autobahn and WAMP (Web Application Messaging Protocol) for Real-Time Application Messaging
MIT License
674 stars 117 forks source link

Any way to change default request maxSize? #316

Closed nducharme closed 4 years ago

nducharme commented 5 years ago

Hi,

First, thanks for this cool project.

We are trying to implement websockets in an existing web application and we are planing to use Thruway as the router. When the client connects to the router, it gets the following error:

WebSocket connection to 'ws://our-domain-here/ws/' failed: Error during WebSocket handshake: Unexpected response code: 413

413 error stands for "Request Entity Too Large". The request max size is defined in Ratchet\Http\HttpRequestParser class and its default value is 4096. We didn't see in the doc how to change this value. Is there any way to bypass or to change this limit without directly editing Ratchet sources? Note that we really need larger max size because our app uses multiple small/medium/large cookies.

Thanks in advance.

mbonneau commented 5 years ago

@nducharme Right now there is no way to override - the only fix right is to edit Ratchet.

Another option would be to use the middleware transport which uses the react/http project as the server.

nducharme commented 5 years ago

Thanks @mbonneau we'll give it a try :-)