aboutsummaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-06-02 18:17:35 -0700
committerJunio C Hamano <junkio@cox.net>2006-06-02 18:17:35 -0700
commit2f164c35fa8915ddd8e8a01809a9935ad900f13c (patch)
tree4a8e5b79c63abd436aea600457775b5557937c25 /http.c
parent20ff06805c66826404b154b9309a8581449af2b0 (diff)
parent2052d146f60eaeeef50cb4d437e4a25051f8d8c3 (diff)
downloadgit-2f164c35fa8915ddd8e8a01809a9935ad900f13c.tar.xz
Merge branch 'ds/doc' into jc/fmt-patch
* ds/doc: Update documentation for git-format-patch sha1_file: avoid re-preparing duplicate packs handle concurrent pruning of packed objects http: prevent segfault during curl handle reuse Remove possible segfault in http-fetch. gitk: show_error fix [PATCH] gitk: start-up bugfix [PATCH] gitk: Replace "git-" commands with "git " [PATCH] gitk: Display commit messages with word wrap gitk: Fix bug where page-up/down wouldn't always work properly gitk: Fix display of "(...)" for parents/children we haven't drawn send-email: only 'require' instead of 'use' Net::SMTP Allow multiple -m options to git-commit.
Diffstat (limited to 'http.c')
-rw-r--r--http.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/http.c b/http.c
index 0cb42a85d1..146cf7bf36 100644
--- a/http.c
+++ b/http.c
@@ -25,7 +25,6 @@ long curl_low_speed_limit = -1;
long curl_low_speed_time = -1;
struct curl_slist *pragma_header;
-struct curl_slist *no_range_header;
struct active_request_slot *active_queue_head = NULL;
@@ -208,7 +207,6 @@ void http_init(void)
curl_global_init(CURL_GLOBAL_ALL);
pragma_header = curl_slist_append(pragma_header, "Pragma: no-cache");
- no_range_header = curl_slist_append(no_range_header, "Range:");
#ifdef USE_CURL_MULTI
{
@@ -344,9 +342,14 @@ 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_HTTPHEADER, no_range_header);
curl_easy_setopt(slot->curl, CURLOPT_ERRORBUFFER, curl_errorstr);
+ curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, NULL);
+ curl_easy_setopt(slot->curl, CURLOPT_READFUNCTION, NULL);
+ curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, NULL);
+ curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
return slot;
}