I used to test the server with original php-cli.ini settings, which did not have the mb-string extension included.
Then when I included the mb-string extension, the connections hang from time to time, without any obvious reasons. I found out tha the mb_strlen($payload) was made on the masked payload, which depending on the mask, causes the mb_strlen-function to be confused and return a false length, which indicates the server that it received a partial message and waits for it.
I changed this line of code in function deframe, line 390 from
if ($headers['length'] > mb_strlen($payload)) {
to
if ($headers['length'] > mb_strlen($this->applyMask($headers,$payload))) {
Could you please check and afterwards update the code, since I am not familiar with git.
Thanks Martin
I used to test the server with original php-cli.ini settings, which did not have the mb-string extension included. Then when I included the mb-string extension, the connections hang from time to time, without any obvious reasons. I found out tha the mb_strlen($payload) was made on the masked payload, which depending on the mask, causes the mb_strlen-function to be confused and return a false length, which indicates the server that it received a partial message and waits for it. I changed this line of code in function deframe, line 390 from
if ($headers['length'] > mb_strlen($payload)) { to if ($headers['length'] > mb_strlen($this->applyMask($headers,$payload))) {
Could you please check and afterwards update the code, since I am not familiar with git. Thanks Martin