Message71259
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? |
|
Date |
User |
Action |
Args |
2008-08-17 02:42:20 | orsenthil | set | recipients:
+ orsenthil, facundobatista, gregory.p.smith, weijie90 |
2008-08-17 02:42:19 | orsenthil | set | messageid: <1218940939.94.0.382839140202.issue2464@psf.upfronthosting.co.za> |
2008-08-17 02:42:19 | orsenthil | link | issue2464 messages |
2008-08-17 02:42:18 | orsenthil | create | |
|