varspool / Wrench

A simple PHP WebSocket implementation for PHP 7.1
Do What The F*ck You Want To Public License
596 stars 210 forks source link

InvalidArgumentException does not exist #15

Closed sergiors closed 12 years ago

sergiors commented 12 years ago

PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid request line' in /var/www/wrench/lib/Wrench/Protocol/Protocol.php:690 Stack trace:

0 /var/www/wrench/lib/Wrench/Protocol/Protocol.php(441): Wrench\Protocol\Protocol->getRequestHeaders('<policy-file-re...')

1 /var/www/wrench/lib/Wrench/Connection.php(199): Wrench\Protocol\Protocol->validateRequestHandshake('<policy-file-re...')

2 /var/www/wrench/lib/Wrench/Connection.php(182): Wrench\Connection->handshake('<policy-file-re...')

3 /var/www/wrench/lib/Wrench/Connection.php(397): Wrench\Connection->onData('<policy-file-re...')

4 /var/www/wrench/lib/Wrench/ConnectionManager.php(245): Wrench\Connection->process()

5 /var/www/wrench/lib/Wrench/ConnectionManager.php(172): Wrench\ConnectionManager->processClientSocket(Resource id #29)

6 /var/www/wrench/lib/Wrench/Server.php(200): Wrench\ConnectionManager->selectAndProcess()

7 /var/www/wrench/examples/server.php(48): Wrench\Server->run()

8 {main}

thrown in /var/www/wrench/lib/Wrench/Protocol/Protocol.php on line 690

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid request line' in /var/www/wrench/lib/Wrench/Protocol/Protocol.php:690 Stack trace:

0 /var/www/wrench/lib/Wrench/Protocol/Protocol.php(441): Wrench\Protocol\Protocol->getRequestHeaders('<policy-file-re...')

1 /var/www/wrench/lib/Wrench/Connection.php(199): Wrench\Protocol\Protocol->validateRequestHandshake('<policy-file-re...')

2 /var/www/wrench/lib/Wrench/Connection.php(182): Wrench\Connection->handshake('<policy-file-re...')

3 /var/www/wrench/lib/Wrench/Connection.php(397): Wrench\Connection->onData('<policy-file-re...')

4 /var/www/wrench/lib/Wrench/ConnectionManager.php(245): Wrench\Connection->process()

5 /var/www/wrench/lib/Wrench/ConnectionManager.php(172): Wrench\ConnectionManager->processClientSocket(Resource id #29)

6 /var/www/wrench/lib/Wrench/Server.php(200): Wrench\ConnectionManager->selectAndProcess()

7 /var/www/wrench/examples/server.php(48): Wrench\Server->run()

8 {main}

thrown in /var/www/wrench/lib/Wrench/Protocol/Protocol.php on line 690

dominics commented 12 years ago

What browser or client was making the connection? What protocol does that client support? Or, even better, what did the client send? (You can usually find this out with debugging tools in the browser, or a debugging proxy like Charles.)

WIthout knowing this, I can't debug the problem further. You could also modify the thrown exception to include information about the request.