http_client.c: fix HTTP_VERSION_STR_LEN and make it more efficient