[issue2868] Problem with urllib and urllib2 in urlopen?

2008-05-17 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: I verified the behaviour but this is a problem with that particular site, not with urllib/urllib2. Should be closed. -- nosy: +BitTorment __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2868

[issue2824] zipfile to handle duplicate files in archive

2008-05-13 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: The mechanism for throwing an error has been written, however for the case of a duplicated filename, it appears to have been deliberatly not been used by the original author.: def _writecheck(self, zinfo): Check for errors before

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-11 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10280/add_header_complete.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2756

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-11 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10201/add_header_complete.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2756

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: I decided that the user should have full control over the headers sent. Any call to add_header() or add_redirected_header() will now check if a header with that same name has been set in the Request before (in both the header

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10200/add_header_complete.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2756

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10201/add_header_complete.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2756

[issue2275] urllib2 header capitalization

2008-05-06 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: This looks good. I would suggest that the unredirected_hdrs would use the CaseInsensitiveDict too. There is still the problem (from the test documentation) that accessing .headers directly will only show a subset of headers i.e. it won't

[issue2776] urllib2.urlopen() gets confused with path with // in it

2008-05-06 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: The problem lines are in AbstractHTTPHandler.do_request(): scheme, sel = splittype(request.get_selector()) sel_host, sel_path = splithost(sel) if not request.has_header('Host'): request.add_unredirected_header('Host

[issue2776] urllib2.urlopen() gets confused with path with // in it

2008-05-06 Thread Martin McNickle
Changes by Martin McNickle [EMAIL PROTECTED]: -- components: +Library (Lib) -Extension Modules versions: +Python 2.6, Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2776

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-05 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: I can see that there will be a problem in this case. However, it may be that the authors found it more intuitive to always set the Content-Type to application/x-www-form-urlencoded when data is set. Their implementation is inconsistent

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-05 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: Sorry, the first example should read: #--- request = urllib2.Request('http://www.whompbox.com/headertest.php') request.add_data(data) f = urllib2.urlopen(request) request.add_header

[issue2695] Ignore case when checking algorithm in urllib2

2008-05-04 Thread Martin McNickle
Martin McNickle [EMAIL PROTECTED] added the comment: RFC2617 says that the authentication scheme should be case insensitive. Included is a patch which changes the string to uppercase before comparison. -- keywords: +patch nosy: +BitTorment Added file: http://bugs.python.org/file10189