User-Agent header no longer needs a leading space

This commit is contained in:
Ben Brown 2013-02-19 20:08:13 +00:00 committed by Stefan Bühler
parent 23181d6f4f
commit c24b5051c0

View File

@ -159,7 +159,7 @@ static char *forge_request(char *url, char keep_alive, char **host, uint16_t *po
continue; continue;
} }
len += strlen(headers[i]) + strlen("\r\n"); len += strlen(headers[i]) + strlen("\r\n");
if (strncmp(headers[i], "User-Agent: ", sizeof("User-Agent: ")-1) == 0) if (strncmp(headers[i], "User-Agent:", sizeof("User-Agent:")-1) == 0)
have_user_agent = 1; have_user_agent = 1;
} }