[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-bugs-list
Subject:    [Python-bugs-list] [ python-Bugs-487471 ] urllib2 proxyhandle won't work.
From:       noreply () sourceforge ! net (noreply () sourceforge ! net)
Date:       2001-11-30 13:10:59
Message-ID: E169nRT-0000vx-00 () usw-sf-web1 ! sourceforge ! net
[Download RAW message or body]

Bugs item #487471, was opened at 2001-11-30 04:54
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=487471&group_id=5470

Category: Python Library
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Ha Shao (hashao)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2 proxyhandle won't work.

Initial Comment:
For python 2.2b2:
Adding proxyhandler with build_opener, install_opener does not
work since order of the handlers does matter (my guess).

In the current code, new handlers are appended at the end
of the handlers list. At least under windows, the proxyhandle
will never got called if it is added with install_opener.
HTTPHandler always get called before proxyhandler if the
default list is altered.

The attached patch try to reserve the order of handlers
based on their baseclass when adding new handlers.

Handlers with the same baseclasses might be added
more than once. Not sure if it is a good thing or bad
thing. Current code will raise except when it trys to remove 
the default handlers twice.

Since order does matter, build_opener
should be repleased by a list like class such that
user can insert their handlers to specific place.

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

>Comment By: Ha Shao (hashao)
Date: 2001-11-30 05:10

Message:
Logged In: YES 
user_id=8717

forgot some code and changed a stupid variable name.

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=487471&group_id=5470


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic