Thread (6 messages) flat view 6 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 2/5] Remove a CURLOPT_HTTPHEADER (un)setting

From: Mike Hommey <hidden>
Date: 2016-06-15 22:43:57
Subsystem: the rest · Maintainer: Linus Torvalds

Setting CURLOPT_HTTPHEADER doesn't add HTTP headers, but replaces whatever
set of headers was configured before, so setting to NULL doesn't have any
magic meaning, and is pretty much useless when setting to another list
right after.

Signed-off-by: Mike Hommey <redacted>
---
 http.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/http.c b/http.c
index 2d0b46d..784b93e 100644
--- a/http.c
+++ b/http.c
@@ -364,7 +364,6 @@ struct active_request_slot *get_active_slot(void)
 	slot->finished = NULL;
 	slot->callback_data = NULL;
 	slot->callback_func = NULL;
-	curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, NULL);
 	curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, pragma_header);
 	curl_easy_setopt(slot->curl, CURLOPT_ERRORBUFFER, curl_errorstr);
 	curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, NULL);
-- 
1.5.3.7.1159.gdd4a4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help