http: use new headers for each object request
commitd01c76f1cfc96ba56f1c7c0e1b051d121ba6cc48
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 17 Apr 2024 00:02:27 +0000 (17 00:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Apr 2024 05:39:06 +0000 (16 22:39 -0700)
treed9f79472d04e03271623b9924fc97354a84fc969
parent90765ea81eab98cd8f26c406588f5a6ea6f4fe82
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>
http.c
http.h