diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-05-02 11:24:11 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-05-02 11:24:11 +0200 |
commit | 96eb9a862b4d90694f7ba13af1a6acfb98eb87c7 (patch) | |
tree | 62b2a58eef583eac170b6ae3cf0138ad2960b90c | |
parent | acc2aeb40754713b8b00fd84d000c2730d0131db (diff) |
http: make sure a blank header overrides accept_decoding
Reported-by: rcanavan
Assisted-by: Isaac Boukris
Closes #785
-rw-r--r-- | lib/http.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c index f3805cc5b..2a7280dba 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1917,6 +1917,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(!conn->allocptr.accept_encoding) return CURLE_OUT_OF_MEMORY; } + else { + Curl_safefree(conn->allocptr.accept_encoding); + conn->allocptr.accept_encoding = NULL; + } #ifdef HAVE_LIBZ /* we only consider transfer-encoding magic if libz support is built-in */ |