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
NMNicolas Mailhot <nicolas.mailhot@laposte.net>
Date
Feb 20, 2012, 15:34 UTC
Message-ID
<e1d3ddd965eb32717163aaa87fa71e17.squirrel@arekh.dyndns.org>
In-Reply-To
<20120220135639.GA5131@sigill.intra.peff.net>
Le Lun 20 février 2012 14:56, Jeff King a écrit :
Show 14 quoted lines
> On Mon, Feb 20, 2012 at 06:38:54AM +0100, Nicolas Mailhot wrote:
>
>> > As a non-browser client, what should git do? We can't make sense of the
>> > content at http://login.corporatenetwork, which is most likely an HTML
>> > form asking for credentials (or even money, if the captive portal is
>> > something like a public wireless provider). The best we can probably do
>> > is die and say "apparently you need to go http://login.corporatenetwork
>> > in a browser before making your request".
>>
>> Actually, the best would be to launch something capable of interpreting html
>> forms on the url given by the error.
>
> Doing that portably is near impossible (keep in mind that git runs on
> things like antique versions of Solaris).

Can't the you let the user specify a browser command (firefox, elinks w3m) to auto-feed the portal page to when needed ?

The main problem with captive portals is when they shut down the connection and the user has no idea how to restore it (and error 511 is intended to fix this, but that won't do a lot of good if the user does is not shown the captive portal url transmitted with the error)

Regards,
-- 
Nicolas Mailhot
Previous: Jeff KingNext: Jeff King
Message 5 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.