Hello guys!
I think it could be related with #15
Steps to reproduce this crash:
launch a server (just server.php from example)
send wrong header (without \r\n):
printf "GET / HTTP/1.0" | nc localhost 8000
At this moment wrench tries to check header:
Method validateRequestHandshake uses getRequestHeaders and if there is no "\r\n" in $response it throws InvalidArgumentException:
if ($eol === false) {
throw new InvalidArgumentException('Invalid request line');
}
The main problem is that nobody catches this exception! =(
There are a lot of methods to solve this problem:
change exception class
add catching somewhere else
catch main exception class from user application (server.php for example)
If you have other opinion about this problem, just say =)
I've reverted this commit and made this pull request.
I think, that it is more correctly, because I don't know all ideology in this project and could be wrong.
Hello guys! I think it could be related with #15 Steps to reproduce this crash:
printf "GET / HTTP/1.0" | nc localhost 8000
At this moment wrench tries to check header: Method validateRequestHandshake uses getRequestHeaders and if there is no
"\r\n"
in$response
it throwsInvalidArgumentException:
The main problem is that nobody catches this exception! =(
There are a lot of methods to solve this problem:
If you have other opinion about this problem, just say =)