arthurkushman / php-wss

Web-socket server/client with multi-process and parse templates support on server and send/receive options on client
MIT License
210 stars 32 forks source link

Insufficient buffer size for HTTP collateral #49

Closed truekenny closed 3 years ago

truekenny commented 3 years ago

If the websocket server is behind cloudflare.com, then this may cause an error. A couple of months ago this did not cause an error, but now the headers are over 1024 bytes.

What is the maximum size of HTTP header values? Apache 8K Nginx 4K-8K IIS 8K-16K Tomcat 8K - 48K

https://github.com/arthurkushman/php-wss/blob/adecc975a9f4da75a0abd26cf657bf2a81f075e8/src/Contracts/WscCommonsContract.php#L16

It must be increased to at least 4096.

arthurkushman commented 3 years ago

@truekenny thx a lot for this investigation and help. Here is a new patch - https://github.com/arthurkushman/php-wss/releases/tag/1.6.2