urllib2 and Set-Cookie with "302 Moved temporarily"

Eino Mäkitalo eino at iki.fi
Mon Dec 13 13:00:01 CET 2004


It seems that urrlib2 default redirection does not allow me to handle
Cookies. Service I'm trying seems to use IP switcher and session id's 
with cookies. After successful login it changes session id 
(PD-H_SESSION-ID) in 302 Moved temporarily. Urllib2 is so clever that it 
handles redirection but with wrong cookies.


Some hookings? Just own version from source.
What is the most lazy way to handle this. Older urllib?

Eino

---------------------------------
HTTP/1.x 302 Moved Temporarily
Set-Cookie: BIGipServerWWW511_HTTP_Pool=1829440010.20480.0000; 
expires=Mon, 13-Dec-2004 11:55:59 GMT; path=/
Set-Cookie: 
PD-H-SESSION-ID=4_w5sBH4QGJ+UqZ0nfWTduFl4yYQj8WToCPG3PO-NPo9sAAslb; Path=/
Set-Cookie: 
PD-H-SESSION-ID=4_w5sBH4QGJ+UqZ0nfWTduFl4yYQj8WToCPG3PO-NPo9sAAslb; Path=/
Date: Mon, 13 Dec 2004 11:25:59 GMT
Message-Id: c365e552-4cf9-11d9-ab36-0a0a0b61aa77
Cache-Control: no-cache
Pragma: no-cache
Connection: close
Location: https://xxx/yyy/xxx/RepresentationApp
Content-Type: text/html



More information about the Python-list mailing list