[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: I've raised #4493 about the issue I raised in my previous comment. ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: This fix was applied in the wrong place. URI path components, and HTTP URI path components in particular, *can* be empty. See RFC 3986. So the comment in the code that was inserted with the fix for this bug that says "possibly malformed" is inc

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-27 Thread Senthil
Senthil <[EMAIL PROTECTED]> added the comment: That was reason in making fix_broken in the urlparse in my patch, Facundo. I had thought, it should be handled in urlparse module and if we make changes in the urlparse.urlunparse/urlparse.urlparse, then we are stepping into area which will break a l

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-26 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Gregory... I tried to fill the path in urlunparse, and other functions that use this started to fail. As we're so close to final releases, I'll leave this as it's right now, that actually fixed the bug... ___

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-17 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: That test case looks good to me for 2.6 and 3.0. Also add a note to the documentation with a versionchanged 2.6 about urlunparse always ensuring there is a / between the netloc and the rest of the url. I would not back port the more genera

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-17 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Maybe we can put it in urlunparse... do you all agree with this test cases? def test_alwayspath(self): u = urlparse.urlparse("http://netloc/path;params?query#fragment";) self.assertEqual(urlparse.urlunparse(u), "http://netloc/path;pa

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-17 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: i was pondering if it should go in urlparse instead. if it did, i think it should be part of urlparse.urlunparse to ensure that there is always a trailing slash after the host:port regardless of what the inputs are. anyways, agreed, this f

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-16 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Senthil: I don't like that. Creating a public method called "fix_broken", introducing new behaviours now in beta, and actually not fixing the url in any broken possibility (just the path if it's not there), it's way too much for this fix. I

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-16 Thread Senthil
Senthil <[EMAIL PROTECTED]> added the comment: Patch for py3k, but please test this before applying. Added file: http://bugs.python.org/file11134/issue2463-py3k.diff ___ Python tracker <[EMAIL PROTECTED]> ___

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-16 Thread Senthil
Changes by Senthil <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11133/issue2464-PATCH1.diff ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-16 Thread Senthil
Senthil <[EMAIL PROTECTED]> added the comment: Ah, I that was a simple fix. :) I very much overlooked the problem after being so much given the hints at the web-sig. I have some comments on the patch, Facundo. 1) I don't think is a good idea to include that portion in the http_error_302 method.

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-16 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: looks good to me. ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-08-16 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Senthil: Look at that URL that the server returned in the second redirect: http://www.wikispaces.com?responseToken=ee3fca88a9b0dc865152d8a9e5b6138d See that the "?" appears without a path between the host and it. Check the item 3.2.2 in t

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-07-03 Thread Facundo Batista
Changes by Facundo Batista <[EMAIL PROTECTED]>: -- assignee: -> facundobatista nosy: +facundobatista ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-05-15 Thread Senthil
Senthil <[EMAIL PROTECTED]> added the comment: The issue is not just with null character. If you observe now the diretion is 302-302-200 and there is no null character. However, still urllib2 is unable to handle multiple redirection properly (IIRC, there is a portion of code to handle multiple re

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-03-28 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: I'm not sure what the best solution for this is. If I truncate the header values at a \x00 character it ends in an infinite redirect loop (which urllib2 detects and raises on). If I simple remove all \x00 characters the resulting url is no

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-03-28 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: Instrumenting the code and looking closer at the tcpdump, its true. wikispaces.com is returning an invalid Location: header with a null byte in the middle of it. The "fix" on our end should be to handle such garbage from such broken web se

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-03-28 Thread Koh Wei Jie
Koh Wei Jie <[EMAIL PROTECTED]> added the comment: Please take your time, because this bug isn't critical. Thanks! __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-03-28 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: The problem does not appear to have anything to do with SSL. The problem is that the chain of HTTP requests goes: GET -> 302 -> 302 -> 301 On the final 301 urllib2's internal state is messed up such that by the time its in the handle_erro

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-03-23 Thread Koh Wei Jie
New submission from Koh Wei Jie <[EMAIL PROTECTED]>: Try the following code: import urllib2 gmail = urllib2.urlopen("https://www.gmail.com";).read() wikispaces = urllib2.urlopen("http://www.wikispaces.com";).read() Getting the html over HTTPS from gmail.com works, but not over HTTP from wikispa