FreeBSD|Portsnap through http proxy
Reply via E-mail | |||
From: | "Matthew Gream" | ||
Date: | Wed, 18 Jan 2006 14:49:37 -0000 (GMT) | ||
For my scenario, further investigation revealed that this was not about NTLM authentication, but about a disparity between fetch(3) and phttpget as used by portsnap.sh when processing proxy authentication data from environment variables. This is a trivial problem. PROBLEM fetch(3) reports that the following two syntaxes are valid: (a) HTTP_PROXY=http:// (b) HTTP_PROXY=http://proxy.example.com:8080 HTTP_PROXY_AUTH=basic:*: 2. portsnap(8) reports that "Since portsnap uses fetch(1) to download updates, setting the HTTP_PROXY environment variable will direct it to fetch updates from the given proxy." 3. Investigation reveals that phttpget only supports 1(b), not 1(a). If the syntax in 1(a) is used, phttpget will extract invalid values for host and port, and not extract authentication values at all. It is a fair assumption that users will either use the short-form syntax in 1(a), or assume it is a valid syntax upon reading portsnap(8) and fetch(3). SOLUTION For consistency, ensure that phttpget parses basic authentication data from the proxy url as in 1(a) above. The following patch works (against HEAD). Note that this handles case where ':pass' is not present.
|
No comments:
Post a Comment