]> git.ipfire.org Git - thirdparty/git.git/commit - http.c
http: provide effective url to callers
authorJeff King <peff@peff.net>
Sat, 28 Sep 2013 08:32:02 +0000 (04:32 -0400)
committerJonathan Nieder <jrnieder@gmail.com>
Mon, 14 Oct 2013 23:55:23 +0000 (16:55 -0700)
commit78868962c03e5bdddad5c5d02c1d5a0c72a7ac26
tree9a2c181a6543de8068494c34d6bb05a23fb7c2f3
parent2501aff8b7516115c409cb34cc50305cdde40a47
http: provide effective url to callers

When we ask curl to access a URL, it may follow one or more
redirects to reach the final location. We have no idea
this has happened, as curl takes care of the details and
simply returns the final content to us.

The final URL that we ended up with can be accessed via
CURLINFO_EFFECTIVE_URL. Let's make that optionally available
to callers of http_get_*, so that they can make further
decisions based on the redirection.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
http.c
http.h