Added select for the first request to handle possible timeouts and empty requests
Removed unnecessary stdout output
_Always_ initialize variables.

It looks like Google Chrome likes to open two TCP connections per
request but only uses one of them. The other one is not used (at least
I have not been able to trace any data packet). This behavior was
causing a bus error/segmentation fault when trying to parse an empty
request.