send cookie on request with urllib2

itay_k itayyy at gmail.com
Fri Apr 21 07:01:30 EDT 2006


ok.
i will explain what exactly i wanna do.

i want to simulate the following client-side script with python:
<body>
<img name="Pic">

<script>
        document.cookie="name=tom";
        document.images["Pic"].src="temp2.html"
</script>

what that happen here, is when this page loading, the browser loads
"temp2.html" with HTTP header:
Cookie: name=tom;

this cookie does not come for the server, this is temporary cookie that
sending from the client to the server.
this cookie doesnt save on disk at all.

is it possible to implements this at python??




More information about the Python-list mailing list