From: Johannes Schindelin Date: Wed, 27 Apr 2016 06:08:09 GMT Subject: Re: [PATCH v2] http: support sending custom HTTP headers Message-ID: In-Reply-To: <20160426174418.GC7609@sigill.intra.peff.net> Hi Peff, On Tue, 26 Apr 2016, Jeff King wrote: > On Tue, Apr 26, 2016 at 10:20:19AM -0700, Junio C Hamano wrote: > > > Jeff King writes: > > > > > But I think this block (even before my patch) also needs to handle the > > > case where "value" is NULL (presumably by complaining with > > > config_error_nonbool). > > > > OK, so squashes found to be necessary so far amounts to the attached > > patch. I still haven't figured out the best way to rephrase the "by > > default" in the proposed log message that made me stutter while > > reading it, though. > > I think that part is just trying to explain the implementation hackery. > Maybe something like: > > Note that `curl_easy_setopt(..., CURLOPT_HTTPHEADER, ...)` takes only > a single list, overriding any previous call. This means we have to > collect _all_ of the headers we want to use into a single list, and > feed it to curl in one shot. Since we already unconditionally set a > "pragma" header when initializing the curl handles, we can add our new > headers to that list. > > For callers which override the default header list (like probe_rpc), > we provide `http_copy_default_headers()` so they can do the same > trick. Thank you very much for this. I replaced that part of the commit message with your version. Ciao, Johannes