summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben@427.org.uk>2013-02-19 20:08:13 +0000
committerStefan B├╝hler <stbuehler@web.de>2013-02-23 12:22:33 +0100
commitc24b5051c0fd6d215ed9ba385f04aed4d12d8852 (patch)
treefb2cb7bcac67a7306d0e5c0972765167da01beb7
parent23181d6f4f09ebcfa7a7a071252a36da7db3193f (diff)
downloadweighttp-c24b5051c0fd6d215ed9ba385f04aed4d12d8852.tar.gz
weighttp-c24b5051c0fd6d215ed9ba385f04aed4d12d8852.zip
User-Agent header no longer needs a leading space
-rw-r--r--src/weighttp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/weighttp.c b/src/weighttp.c
index a7744b5..fa6af29 100644
--- a/src/weighttp.c
+++ b/src/weighttp.c
@@ -159,7 +159,7 @@ static char *forge_request(char *url, char keep_alive, char **host, uint16_t *po
continue;
}
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;
}