git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] http: inform about alternates-as-redirects behavior

From
BWBrandon Williams <bmwill@google.com>
Date
Mar 6, 2017, 18:03 UTC
Message-ID
<20170306180302.GA183239@google.com>
In-Reply-To
<20170304084547.4mg4beudseznaw72@sigill.intra.peff.net>
On 03/04, Jeff King wrote:
Show 39 quoted lines
> On Sat, Mar 04, 2017 at 08:36:45AM +0000, Eric Wong wrote:
> 
> > I also think the security implications for relative alternates
> > on the same host would not matter, since the smart HTTP will
> > take them into account on the server side.
> 
> It depends on the host whether all of the repos on it have the same
> security domain or not. A site like github.com hosts both public and
> private repositories, and you do not want a public repo redirecting to
> the private one to get objects.
> 
> Of course, that depends on untrusted users being able to configure
> server-side alternates, which GitHub certainly would not let you do. I
> would hope other multi-user hosting sites behave similarly (most hosting
> sites do not seem to allow dumb http at all).
> 
> > Perhaps we give http_follow_config ORable flags:
> > 
> > 	HTTP_FOLLOW_NONE = 0,
> > 	HTTP_FOLLOW_INITIAL = 0x1,
> > 	HTTP_FOLLOW_RELATIVE = 0x2,
> > 	HTTP_FOLLOW_ABSOLUTE = 0x4,
> > 	HTTP_FOLLOW_ALWAYS = 0x7,
> > 
> > With the default would being: HTTP_FOLLOW_INITIAL|HTTP_FOLLOW_RELATIVE
> > (but I suppose that's a patch for another time)
> 
> I don't have a real problem with breaking it down that way, if somebody
> wants to make a patch. Mostly the reason I didn't do so is that I don't
> think http-alternates are in common use these days, since smart-http is
> much more powerful.
> 
> > ----------8<-----------
> > From: Eric Wong <e@80x24.org>
> > Subject: [PATCH] http: inform about alternates-as-redirects behavior
> 
> This v2 looks fine to me.
> 
> -Peff

I know I'm a little late to the party but v2 looks good to me too. I like the change from v1 that only mentions the config option as opposed to listing a value it should be set to.

-- 
Brandon Williams
Previous: Jeff KingNext: Ramsay Jones
Message 8 of 9 in “http: inform about alternates-as-redirects behavior”
  1. http: inform about alternates-as-redirects behaviorEric Wong, Mar 4, 2017
  2. Jeff KingMar 4, 2017
  3. Jeff KingMar 4, 2017
  4. Eric WongMar 4, 2017
  5. Jeff KingMar 4, 2017
  6. http: inform about alternates-as-redirects behaviorEric Wong, Mar 4, 2017
  7. Jeff KingMar 4, 2017
  8. Brandon WilliamsMar 6, 2017
  9. Ramsay JonesMar 4, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.