weighttp/debian/patches/0003-User-Agent-header-no-l...

22 lines
672 B
Diff
Raw Normal View History

2013-05-09 17:21:10 +00:00
From: Ben Brown <ben@427.org.uk>
Date: Tue, 19 Feb 2013 20:08:13 +0000
Subject: User-Agent header no longer needs a leading space
---
src/weighttp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}