cookie problem

Carsten Gaebler cg at schlund.de
Fri Aug 18 09:20:29 EDT 2000


> I have following script to test use of cookies, but all I get is "Set-Cookie:
> name=Test; some text" output in the browser. What I'm doing wrong?
> 
> Thank in advance.
> Jan
> 
> <pre>
> #!/usr/bin/env python
> 
> print """Content-type: text/html
> 
> Set-Cookie: name=Test;
> 
> <HTML><BODY>some text</BODY></HTML>"""
> </pre>

Remove the newline before "Set-Cookie":

print """Content-type: text/html
Set-Cookie: name=Test;

<HTML><BODY>some text</BODY></HTML>"""


Carsten.



More information about the Python-list mailing list