This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients facundobatista, gregory.p.smith, orsenthil, weijie90
Date 2008-08-17.02:42:17
SpamBayes Score 1.146714e-08
Marked as misclassified No
Message-id <1218940939.94.0.382839140202.issue2464@psf.upfronthosting.co.za>
In-reply-to
Content
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. That makes the fix "very" specific to "this"
issue only. 
Another point is, fixing broken url's should not be under urllib2,
urlparse would be a better place.
So, I came up with the approach wherein urllib2 does unparse(parse) of
the url and parse methods will fix the url if it is broken. ( See
attached   issue2464-PATCH1.diff)

But if we handle it in the urlparse methods, then we are much
susceptible to breaking RFC conformance, breaking a lot of tests, Which
is not a  good idea.

So,I introduced fix_broken() method in urlparse and called it to solve
the issue, using the same logic as yours (issue2464-py26-FINAL.diff)
With fix_broken() method in urlparse, we will have better control
whenever we want to implement a behavior which is RFC non-confirming but
implemented widely by browsers and clients.

All tests pass with issue2464-py26-FINAL.diff

Comments,please?
History
Date User Action Args
2008-08-17 02:42:20orsenthilsetrecipients: + orsenthil, facundobatista, gregory.p.smith, weijie90
2008-08-17 02:42:19orsenthilsetmessageid: <1218940939.94.0.382839140202.issue2464@psf.upfronthosting.co.za>
2008-08-17 02:42:19orsenthillinkissue2464 messages
2008-08-17 02:42:18orsenthilcreate