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

Re: Handle HTTP error 511 Network Authentication Required (standard secure proxy authentification/captive portal detection)

From
Jeff King <peff@peff.net>
Date
Feb 20, 2012, 19:15 UTC
Message-ID
<20120220191500.GA29228@sigill.intra.peff.net>
In-Reply-To
<cb81840f853a1d43a7da03ea24c86445.squirrel@arekh.dyndns.org>
On Mon, Feb 20, 2012 at 07:27:08PM +0100, Nicolas Mailhot wrote:
Show 12 quoted lines
> Step 3 is a quite less obvious on a corporate network, where Internet access
> is gated by a filtering proxy, that will let some sites pass transparently but
> require credentials to let you access others. Worst case, there are several
> load-balanced gateways on different physical sites (to avoid spofs in case of
> planes falling on the wrong place), that do not share authentication (because
> propagating auth across physical sites is hard). So no, just launching a
> browser is not sufficient to find the captive portal, you need to actually
> access the URL returned by error 511 in meta information. Git should at
> minimum report this URL.
> 
> (and no this is not an hypothetical scenario and yes there are git users
> trying to pass the gateways there)

This is exactly the sort of information I wanted to get from a real-world scenario. From your initial messages, it sounded like a purely hypothetical thing.

I think a good first step would be improving the error message for a 511, then. Unfortunately, it seems from the rfc draft you sent that callers are expected to parse the link out of the HTML given in the body of the response. It seems silly that there is not a Location field associated with a 511, similar to redirects.

-Peff
Previous: Nicolas MailhotNext: Nicolas Mailhot
Message 8 of 14 in “Handle HTTP error 511 Network Authentication Required (standard secure proxy authentification/captive portal detection)”
  1. Nicolas MailhotFeb 19, 2012
  2. Jeff KingFeb 20, 2012
  3. Nicolas MailhotFeb 20, 2012
  4. Jeff KingFeb 20, 2012
  5. Nicolas MailhotFeb 20, 2012
  6. Jeff KingFeb 20, 2012
  7. Nicolas MailhotFeb 20, 2012
  8. Jeff KingFeb 20, 2012
  9. Nicolas MailhotFeb 20, 2012
  10. Jeff KingFeb 20, 2012
  11. Nicolas MailhotFeb 20, 2012
  12. Daniel StenbergFeb 20, 2012
  13. Jeff KingFeb 20, 2012
  14. Junio C HamanoFeb 20, 2012

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.