Trying to send cookies with POST.

Giganews Newsgroups
Subject: Trying to send cookies with POST.
Posted by:  Caleb (no…
Date: Sat, 1 May 2004


I'm trying to make a program that directly submits data to a webpage.

The thing is, that the web page requires a user to be logged in in order to
submit the page.
I've sniffed the POST data with the browser, and I've spotted that it sends
cookies like this:

Cookie: name=caleb; pass=mypassword;

So basically, If I send those headers along with the POST then it wont

I've tried using:
http.CookieManager.AddCookie('name=caleb', '');
http.CookieManager.AddCookie('pass=mypassword', '');

and then Http.Post(..)
That did not work!

Then i've tried modifying the Custom headers and adding this line:
Cookie: name=caleb; pass=mypassword
Then I've called Http.SetHeaders; Http.Post(...)
That seemed to work for a test file on my localhost (it recognized the
But for the target webpage it did not work. It looked like that my cookies
were overriden by their SESSIONID cookie (i've compared the sent headers
with the recieved headers. In the recieved headers my cookies were absent)

I'm all out of ideas :(

Is there anyone who could help me with this?