diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-08-21 21:10:30 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-08-21 21:10:31 +0200 |
commit | 80e135d9726eb897cd7d9e45a17bbd59e3a8b236 (patch) | |
tree | 3ee39cd84fb08c931b06bf70e019549d17fed3e4 /uclient-http.c | |
parent | 5152b7147e7a2fbb4543160e69ea75dbb3b5821a (diff) | |
download | uclient-80e135d9726eb897cd7d9e45a17bbd59e3a8b236.tar.gz |
http: ignore empty lines before HTTP response
Fixes HTTP keepalive issues with some servers
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uclient-http.c')
-rw-r--r-- | uclient-http.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/uclient-http.c b/uclient-http.c index 47c890f..4633956 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -552,6 +552,9 @@ static void uclient_parse_http_line(struct uclient_http *uh, char *data) if (uh->state == HTTP_STATE_REQUEST_DONE) { char *code; + if (!strlen(data)) + return; + /* HTTP/1.1 */ strsep(&data, " "); |