git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 2/5] Remove a CURLOPT_HTTPHEADER (un)setting
Date: Mon, 10 Dec 2007 22:36:08 +0100	[thread overview]
Message-ID: <1197322571-25023-2-git-send-email-mh@glandium.org> (raw)
In-Reply-To: <1197322571-25023-1-git-send-email-mh@glandium.org>

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>
---
 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

  reply	other threads:[~2007-12-10 21:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10 21:36 [PATCH 1/5] Remove the default_headers variable from http-push.c Mike Hommey
2007-12-10 21:36 ` Mike Hommey [this message]
2007-12-10 21:36   ` [PATCH 3/5] Avoid redundant declaration of missing_target() Mike Hommey
2007-12-10 21:36     ` [PATCH 4/5] Correctly initialize buffer in start_put() in http-push.c Mike Hommey
2007-12-10 21:36       ` [PATCH 5/5] Fix various memory leaks in http-push.c and http-walker.c Mike Hommey
2007-12-10 23:08         ` [PATCH 6/5] Move fetch_ref from http-push.c and http-walker.c to http.c Mike Hommey
2007-12-11  5:09           ` Junio C Hamano
2007-12-11  6:21             ` Mike Hommey
2007-12-11  7:22               ` Andreas Ericsson
2007-12-11  7:49                 ` Mike Hommey
2007-12-11 20:00                   ` [New PATCH] " Mike Hommey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1197322571-25023-2-git-send-email-mh@glandium.org \
    --to=mh@glandium.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).