diff options
author | Jeff King <peff@peff.net> | 2012-04-13 02:19:25 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-14 16:04:25 -0700 |
commit | 6f4c347ca1d3102d77e2dd36b6bc8ab12de6045b (patch) | |
tree | e08adc42dce7137227225d044cc5386da9ac837d /pack-refs.h | |
parent | http: clean up leak in init_curl_http_auth (diff) | |
download | tgif-6f4c347ca1d3102d77e2dd36b6bc8ab12de6045b.tar.xz |
http: use newer curl options for setting credentials
We give the username and password to curl by sticking them
in a buffer of the form "user:pass" and handing the result
to CURLOPT_USERPWD. Since curl 7.19.1, there is a split
mechanism, where you can specify each element individually.
This has the advantage that a username can contain a ":"
character. It also is less code for us, since we can hand
our strings over to curl directly. And since curl 7.17.0 and
higher promise to copy the strings for us, we we don't even
have to worry about memory ownership issues.
Unfortunately, we have to keep the ugly code for old curl
around, but as it is now nicely #if'd out, we can easily get
rid of it when we decide that 7.19.1 is "old enough".
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-refs.h')
0 files changed, 0 insertions, 0 deletions