From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: git@vger•kernel.org, "Kyle J. McKay" <mackyle@gmail•com>
Subject: Re: [PATCH 6/9] http: update base URLs when we see redirects
Date: Fri, 18 Oct 2013 12:20:50 -0700 [thread overview]
Message-ID: <xmqqbo2mwfl9.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20131018184250.GA11040@sigill.intra.peff.net> (Jeff King's message of "Fri, 18 Oct 2013 14:42:50 -0400")
Jeff King <peff@peff•net> writes:
> On Fri, Oct 18, 2013 at 11:25:13AM -0700, Junio C Hamano wrote:
>
>> Jeff King <peff@peff•net> writes:
>>
>> > + * Our basic strategy is to compare "base" and "asked" to find the bits
>> > + * specific to our request. We then strip those bits off of "got" to yield the
>> > + * new base. So for example, if our base is "http://example.com/foo.git",
>> > + * and we ask for "http://example.com/foo.git/info/refs", we might end up
>> > + * with "https://other.example.com/foo.git/info/refs". We would want the
>> > + * new URL to become "https://other.example.com/foo.git".
>>
>> Not "https://other.example.com/foo.git/info/refs"?
>
> I think my use of "the new URL" is ambiguous. I meant "the new base",
> from which one could then construct the new refs URL as you suggest.
Ahh, there is nothing we need to do to make the new URL to
"https://.../info/refs"; we already have it in "got". And the
function resets "base" and then adds "got" excluding its tail part
to compute the new base. So "s/new URL/new base/" would be all we
need to do, I think.
Thanks.
next prev parent reply other threads:[~2013-10-18 19:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-28 8:29 [PATCH 0/9] following http redirects Jeff King
2013-09-28 8:31 ` [PATCH 1/9] http_get_file: style fixes Jeff King
2013-09-28 8:31 ` [PATCH 2/9] http_request: factor out curlinfo_strbuf Jeff King
2013-09-28 8:31 ` [PATCH 3/9] http: refactor options to http_get_* Jeff King
2013-09-28 8:31 ` [PATCH 4/9] http: hoist credential request out of handle_curl_result Jeff King
2013-09-28 8:32 ` [PATCH 5/9] http: provide effective url to callers Jeff King
2013-09-28 8:34 ` [PATCH 6/9] http: update base URLs when we see redirects Jeff King
2013-09-29 18:54 ` brian m. carlson
2013-09-29 19:26 ` Eric Sunshine
2013-09-29 19:32 ` Jeff King
2013-09-29 19:50 ` Eric Sunshine
2013-10-18 18:25 ` Junio C Hamano
2013-10-18 18:42 ` Jeff King
2013-10-18 19:20 ` Junio C Hamano [this message]
2013-09-28 8:35 ` [PATCH 7/9] remote-curl: make refs_url a strbuf Jeff King
2013-09-28 8:35 ` [PATCH 8/9] remote-curl: store url as " Jeff King
2013-09-28 8:35 ` [PATCH 9/9] remote-curl: rewrite base url from info/refs redirects Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbo2mwfl9.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=mackyle@gmail$(echo .)com \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox