[Patches] [ python-Patches-1648102 ] proxy_bypass in urllib handling of <local> macro

SourceForge.net noreply at sourceforge.net
Sun Aug 19 09:34:59 CEST 2007


Patches item #1648102, was opened at 2007-01-30 23:44
Message generated for change (Comment added) made by orsenthil
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1648102&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Anthony Tuininga (atuining)
Assigned to: Nobody/Anonymous (nobody)
Summary: proxy_bypass in urllib handling of <local> macro

Initial Comment:
We have discovered that the handling of the <local> macro in urllib.proxy_bypass is broken. According to the Microsoft documentation for this macro, what should be checked is simply that the host name specified does not contain a period. Since urllib gets its proxy information directly from the Windows registry it would make sense to use the same definitions that Microsoft does. Attached is a patch that does this.

Here is a link to the documentation that specifies this:

http://msdn2.microsoft.com/en-gb/library/aa384098.aspx

Note the section discussing the proxy bypass parameter.

In addition, this patch adds code to strip the entries in the proxy bypass settings of any leading and trailing spaces. Internet Explorer supports this although it does not appear to be officially documented.

----------------------------------------------------------------------

Comment By: O.R.Senthil Kumaran (orsenthil)
Date: 2007-08-19 13:04

Message:
Logged In: YES 
user_id=942711
Originator: NO

>From the documentation:

pwszProxyBypass
    [in] A pointer to a string variable that contains an optional list of
host names or IP addresses, or both, that should not be routed through the
proxy when dwAccessType is set to WINHTTP_ACCESS_TYPE_NAMED_PROXY. The list
can contain wildcard characters. Do not use an empty string, because the
WinHttpOpen function uses it as the proxy bypass list. If this parameter
specifies the "<local>" macro as the only entry, this function bypasses any
host name that does not contain a period. If dwAccessType is not set to
WINHTTP_ACCESS_TYPE_NAMED_PROXY, this parameter must be set to
WINHTTP_NO_PROXY_BYPASS.

Yes,valid patch for urllib.py.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1648102&group_id=5470


More information about the Patches mailing list