summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorDavid Turner <dturner@twopensource.com>2015-11-02 21:39:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-11-02 22:18:06 (GMT)
commit835c4d3689972e616bd109cec3dd8cd4aa4d4c0d (patch)
treeda7c8b996579dfcab25af29063fc8fc6dc219bf4 /http.h
parent2635c2b8bfc9aec07b7f023d8e3b3d02df715344 (diff)
downloadgit-835c4d3689972e616bd109cec3dd8cd4aa4d4c0d.zip
git-835c4d3689972e616bd109cec3dd8cd4aa4d4c0d.tar.gz
git-835c4d3689972e616bd109cec3dd8cd4aa4d4c0d.tar.bz2
http.c: use CURLOPT_RANGE for range requests
A HTTP server is permitted to return a non-range response to a HTTP range request (and Apache httpd in fact does this in some cases). While libcurl knows how to correctly handle this (by skipping bytes before and after the requested range), it only turns on this handling if it is aware that a range request is being made. By manually setting the range header instead of using CURLOPT_RANGE, we were hiding the fact that this was a range request from libcurl. This could cause corruption. Signed-off-by: David Turner <dturner@twopensource.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r--http.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/http.h b/http.h
index 49afe39..4f97b60 100644
--- a/http.h
+++ b/http.h
@@ -190,7 +190,6 @@ struct http_pack_request {
struct packed_git **lst;
FILE *packfile;
char tmpfile[PATH_MAX];
- struct curl_slist *range_header;
struct active_request_slot *slot;
};