You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by da...@accenture.com on 2008/12/31 17:08:30 UTC

Cookie Question?

Hi  all ,
 
I think I have a problem with  a cookie not being received from
HttpClient. As can be seen from LiveHttpHeaders plugin from Firefox you
can see that when I move to the account page with Firefox that one of
the cookies received is delayRepayLoginComplete=1 but as you can see
from the log4j Debug reults at the very bottom that you can see that I
do send the delayRepayLoginComplete=1 cookie but I dont receive/accept
the cookie back! Not accepting this cookie back then prevents me from
moving further around my account page and redirects me to a page that
doesnt require a login.
 
Any tips as what can be done to get accept this cookie or request it to
be sent would be appreciated?
Please feel free to tell me if I have made some wrong assumptions as
this is all new to me.
 
Thanks
 
----------------------------------------------------------
http://www.mysite.co.uk/Main.php?iCmsPageId=32&sAction=AccountHome
 
GET /Main.php?iCmsPageId=32&sAction=AccountHome HTTP/1.1
Host: www.mysite.co.uk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5)
Gecko/2008120122 Firefox/3.0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.mysite.co.uk/Main.php?sEvent=DelayRepay
Cookie: fcc_type=business;
__utma=239435284.92308847979404080.1230517450.1230725506.1230736159.10;
__utmz=239435284.1230517450.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(
none); PHPSESSID=tvvid80rhp5m14d3bmipphcgq3;
X-Mapping-chkpfbio=4F0131823E507D871730985173A4E077;
__utmb=239435284.1.10.1230736159; __utmc=239435284;
delayRepayLoginComplete=1
 
HTTP/1.x 200 OK
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Date: Wed, 31 Dec 2008 15:09:26 GMT
Transfer-Encoding: chunked
Connection: Keep-Alive
Server: Apache/2.0.59 (CentOS)
X-Powered-By: PHP/5.1.6
Content-Type: text/html; charset=UTF-8
Pragma: no-cache
---------------------------------------------------------- 
 
Below is the debug code from log4j
 
DEBUG [httpclient.wire.header] >> "GET
/Main.php?iCmsPageId=32&sAction=AccountHome HTTP/1.1[\r][\n]"
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Adding Host request
header
DEBUG [httpclient.wire.header] >> "User-Agent: Jakarta
Commons-HttpClient/3.1[\r][\n]"
DEBUG [httpclient.wire.header] >> "Host: www.mysite.co.uk[\r][\n
<http://www.mysite.co.uk[\r][\n> ]"
DEBUG [httpclient.wire.header] >> "Cookie:
PHPSESSID=d9mpu2ldm1676vddi1frd7k7k1[\r][\n]"
DEBUG [httpclient.wire.header] >> "Cookie: fcc_type=business[\r][\n]"
DEBUG [httpclient.wire.header] >> "Cookie:
delayRepayLoginComplete=1[\r][\n]"
DEBUG [httpclient.wire.header] >> "Cookie:
X-Mapping-chkpfbio=F4A71D0EB4DBC40FBE8F477BF48CF0CF[\r][\n]"
DEBUG [httpclient.wire.header] >> "[\r][\n]"
DEBUG [httpclient.wire.header] << "HTTP/1.1 200 OK[\r][\n]"
DEBUG [httpclient.wire.header] << "HTTP/1.1 200 OK[\r][\n]"
DEBUG [httpclient.wire.header] << "Expires: Thu, 19 Nov 1981 08:52:00
GMT[\r][\n]"
DEBUG [httpclient.wire.header] << "Set-Cookie: fcc_type=business;
expires=Thu, 31-Dec-2009 15:18:08 GMT; path=/[\r][\n]"
DEBUG [httpclient.wire.header] << "Set-Cookie:
X-Mapping-chkpfbio=F4A71D0EB4DBC40FBE8F477BF48CF0CF; path=/[\r][\n]"
DEBUG [httpclient.wire.header] << "Cache-Control: no-store, no-cache,
must-revalidate, post-check=0, pre-check=0[\r][\n]"
DEBUG [httpclient.wire.header] << "Date: Wed, 31 Dec 2008 15:18:08
GMT[\r][\n]"
DEBUG [httpclient.wire.header] << "Transfer-Encoding: chunked[\r][\n]"
DEBUG [httpclient.wire.header] << "Connection: Keep-Alive[\r][\n]"
DEBUG [httpclient.wire.header] << "Server: Apache/2.0.59
(CentOS)[\r][\n]"
DEBUG [httpclient.wire.header] << "X-Powered-By: PHP/5.1.6[\r][\n]"
DEBUG [httpclient.wire.header] << "Content-Type: text/html;
charset=UTF-8[\r][\n]"
DEBUG [httpclient.wire.header] << "Pragma: no-cache[\r][\n]"
DEBUG [httpclient.wire.header] << "[\r][\n]"
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Cookie accepted:
"fcc_type=business"
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Cookie accepted:
"X-Mapping-chkpfbio=F4A71D0EB4DBC40FBE8F477BF48CF0CF" 


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.