G
Guest
C#, WinXP SP2, VS 2005Beta2
I need to emulate the browser functionality wihin my app. I need to visit a
web page , parse it and post back the results to another page. Everything
works fine, except that when the steps are performed from the browser, the
web server provides an extra set-cookie header in the second page's response.
Here is a trace:
From the browser:
POST /saregamapa/admin/srgma_vote_results.php HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer: http://sifymax.com/saregamapa/admin/srgma_vote_page.php
A ccept-Language: en-us
Content-Type: application/x-www-form-urlencoded
XXXXXXXXXXXXXXX:++++++++++++++
User-Agen t: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.0.3705; Media Center PC 2.8; .NET CLR 2.0.50727)
Host: sifymax.com
Content-Length: 60
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: Cookie_Enable=1
vote=274331d3c115b6a2011&vote_code=8d0abc&voteche ck=43c6428e
Response header:
HTTP/1.1 200 OK
Date: Thu, 12 Jan 2006 11:51:07 GMT
Server: Apache
X-Powered-By: PHP/4.2.3
Set-Cookie: Saregamapa_Vote=1; path=/
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
From the Java Applet:
POST /saregamapa/admin/srgma_vote_results.php HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer: http%3A%2F%2Fsifymax.com%2Fsaregamapa%2Fadmin%2Fsrgma_vote_page.php
Accept-La nguage: en-us
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host: sifymax.com
Content-Length: 60
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: Cookie_Enable=1
vote=757251d3c100145201d&vote_code=7eb60f&voteche ck=43c6425b
Response header:
HTTP/1.1 200 OK
Date: Thu, 12 Jan 2006 11:49:49 GMT
Server: Apache
X-Powered-By: PHP/4.2.3
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
I need to emulate the browser functionality wihin my app. I need to visit a
web page , parse it and post back the results to another page. Everything
works fine, except that when the steps are performed from the browser, the
web server provides an extra set-cookie header in the second page's response.
Here is a trace:
From the browser:
POST /saregamapa/admin/srgma_vote_results.php HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer: http://sifymax.com/saregamapa/admin/srgma_vote_page.php
A ccept-Language: en-us
Content-Type: application/x-www-form-urlencoded
XXXXXXXXXXXXXXX:++++++++++++++
User-Agen t: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.0.3705; Media Center PC 2.8; .NET CLR 2.0.50727)
Host: sifymax.com
Content-Length: 60
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: Cookie_Enable=1
vote=274331d3c115b6a2011&vote_code=8d0abc&voteche ck=43c6428e
Response header:
HTTP/1.1 200 OK
Date: Thu, 12 Jan 2006 11:51:07 GMT
Server: Apache
X-Powered-By: PHP/4.2.3
Set-Cookie: Saregamapa_Vote=1; path=/
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
From the Java Applet:
POST /saregamapa/admin/srgma_vote_results.php HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer: http%3A%2F%2Fsifymax.com%2Fsaregamapa%2Fadmin%2Fsrgma_vote_page.php
Accept-La nguage: en-us
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host: sifymax.com
Content-Length: 60
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: Cookie_Enable=1
vote=757251d3c100145201d&vote_code=7eb60f&voteche ck=43c6425b
Response header:
HTTP/1.1 200 OK
Date: Thu, 12 Jan 2006 11:49:49 GMT
Server: Apache
X-Powered-By: PHP/4.2.3
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html