request: improve security over first HTTP request line.

The HTTP parser did not evaluate probable invalid return values
for the index() glibc function. This patch force to verify the
value before to move forward with the next parsing instructions.

Signed-off-by: Eduardo Silva <edsiper@gmail.com>