diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2024-04-17 02:02:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-17 07:39:06 +0200 |
commit | d01c76f1cfc96ba56f1c7c0e1b051d121ba6cc48 (patch) | |
tree | d9f79472d04e03271623b9924fc97354a84fc969 /http.h | |
parent | remote-curl: reset headers on new request (diff) | |
download | git-d01c76f1cfc96ba56f1c7c0e1b051d121ba6cc48.tar.xz git-d01c76f1cfc96ba56f1c7c0e1b051d121ba6cc48.zip |
http: use new headers for each object request
Currently we create one set of headers for all object requests and reuse
it. However, we'll need to adjust the headers for authentication
purposes in the future, so let's create a new set for each request so
that we can adjust them if the authentication changes.
Note that the cost of allocation here is tiny compared to the fact that
we're making a network call, not to mention probably a full TLS
connection, so this shouldn't have a significant impact on performance.
Moreover, nobody who cares about performance is using the dumb HTTP
protocol anyway, since it often makes huge numbers of requests compared
to the smart protocol.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -196,6 +196,7 @@ struct http_pack_request { FILE *packfile; struct strbuf tmpfile; struct active_request_slot *slot; + struct curl_slist *headers; }; struct http_pack_request *new_http_pack_request( @@ -229,6 +230,7 @@ struct http_object_request { int zret; int rename; struct active_request_slot *slot; + struct curl_slist *headers; }; struct http_object_request *new_http_object_request( |