Make sure we reset bytes_to_read to 0

If buffer contains enough data to serve request, then we don't need to
attempt to read from socket as well.

Signed-off-by: Ben Agricola <bagricola@squiz.co.uk>