Message61131
1. The Cookie module should do a better job parsing real-
world cookies (the stuff that comes from http servers
following Set-cookie: headers) and should also have a
documented way to emit a client-side cookie (i.e.
generate a correct Cookie: header from a cookie
object).
2. Urllib or urllib2 should be enhanced to read incoming
cookie headers and send back the appropriate cookies in
the event of an HTTP redirect. Many sites set a cookie
then redirect to some other location which tries to read
the cookie; if the cookie isn't there, the new location
bounces back to the original one to set the cookie, so
you get a redirection loop.
3. The scheme of having urllib.urlopen() return the http
headers in a dictionary-like object doesn't quite work:
for example, there can be several Set-cookie headers in
a single http response. I don't know if the opener
currently combines them or discards some; neither way
is really satisfactory. There really should be a list for
each header type, but that would mess up the existing
published interface, so maybe a new 'urllib3' is needed.
I'm just starting to explore this stuff but it seems to me
like a serious urllib module needs to do quite a bit more
than the existing ones do. The Perl LWP documentation
might be a good place to look for inspiration. |
|
Date |
User |
Action |
Args |
2008-01-20 09:59:28 | admin | link | issue841728 messages |
2008-01-20 09:59:28 | admin | create | |
|