Re: [PATCH] http: attempt updating base URL only if no error

2017-02-28 Thread Jeff King
On Tue, Feb 28, 2017 at 10:48:52AM -0800, Jonathan Tan wrote: > > Running your included test, we get: > > > > fatal: unable to access 'http://127.0.0.1:5550/redir-to/502/': The > > requested URL returned error: 502 > > > > but the error really happened in the intermediate step. I wonder if

Re: [PATCH] http: attempt updating base URL only if no error

2017-02-28 Thread Jonathan Tan
On 02/28/2017 05:28 AM, Jeff King wrote: Right, your patch makes sense. A real HTTP error should take precedence over the url-update trickery. Acked-by: Jeff King Thanks! Running your included test, we get: fatal: unable to access 'http://127.0.0.1:5550/redir-to/502/':

Re: [PATCH] http: attempt updating base URL only if no error

2017-02-28 Thread Jeff King
On Mon, Feb 27, 2017 at 06:53:11PM -0800, Jonathan Tan wrote: > http.c supports HTTP redirects of the form > > http://foo/info/refs?service=git-upload-pack > -> http://anything > -> http://bar/info/refs?service=git-upload-pack > > (that is to say, as long as the Git part of the path and

[PATCH] http: attempt updating base URL only if no error

2017-02-27 Thread Jonathan Tan
http.c supports HTTP redirects of the form http://foo/info/refs?service=git-upload-pack -> http://anything -> http://bar/info/refs?service=git-upload-pack (that is to say, as long as the Git part of the path and the query string is preserved in the final redirect destination, the