Remove a CURLOPT_HTTPHEADER (un)setting

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 <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Mike Hommey 2007-12-10 22:36:08 +01:00 committed by Junio C Hamano
parent c20f290808
commit 02dc534fc6

1
http.c
View File

@ -370,7 +370,6 @@ struct active_request_slot *get_active_slot(void)
slot->finished = NULL; slot->finished = NULL;
slot->callback_data = NULL; slot->callback_data = NULL;
slot->callback_func = 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_HTTPHEADER, pragma_header);
curl_easy_setopt(slot->curl, CURLOPT_ERRORBUFFER, curl_errorstr); curl_easy_setopt(slot->curl, CURLOPT_ERRORBUFFER, curl_errorstr);
curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, NULL); curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, NULL);