Handle multiple cookies with httplib

Shagshag shagshag13 at yahoo.fr
Thu Apr 1 06:46:15 EST 2004


hello,

how can i set multiple cookies like :

Set-Cookie: cookiename1=value1; expires=Tue, 31-Mar-09 11:17:43 GMT;
path=/; domain=www.domain.com
Set-Cookie: cookiename2=value2; expires=Tue, 31-Mar-09 11:17:43 GMT;
path=/; domain=www.domain.com

to a httplib.HTTPConnection ?

i used to do : 

  connection = httplib.HTTPConnection(host)
  connection.putrequest('GET', pathn)
  connection.putheader('Cookie', cookie)

also is there any way to view 'connection' in a readable format to
understand how it is build after using many 'putheader' ?

regards



More information about the Python-list mailing list