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 B K <gr...@hotmail.com> on 2005/10/15 01:34:19 UTC

Interesting Cookie problem

Hi all,
     I have a cookie problem which has me stumped the error I get is as 
follows

WARNING: Cookie rejected: "$Version=0; user%5Flanguage=EN; $Domain=http; 
$Path=/". Illegal domain attribute "http". Domain of origin: 
"http://www.*******.com"

I have replaced the real site name with *, now httpclient can't set the 
cookie because the domain is not valid. The strange thing is when I do the 
same browing using IE and HttpWatch to look at the cookies the domain is 
just *******.com which is valid and therefore no problem. How come I get a 
different cookie with httpclient?

I have tried setting the user agent to "Mozilla/4.0 (compatible; MSIE 6.0; 
Windows NT 5.1; SV1)" which is the same as IE, same result. I have tried all 
the standard cookie policies, same thing.

Is there an easy way around this or do I need to manually create all the 
cookies.

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


RE: Interesting Cookie problem

Posted by B K <gr...@hotmail.com>.
Its ok have solved this issue, I had a http:// in the front when I was doing 
a client.getHostConfiguration().setHost, this then screwed up the cookies.


>From: "B K" <gr...@hotmail.com>
>Reply-To: "HttpClient User Discussion" <ht...@jakarta.apache.org>
>To: httpclient-user@jakarta.apache.org
>Subject: Interesting Cookie problem
>Date: Sat, 15 Oct 2005 09:34:19 +1000
>
>Hi all,
>     I have a cookie problem which has me stumped the error I get is as 
>follows
>
>WARNING: Cookie rejected: "$Version=0; user%5Flanguage=EN; $Domain=http; 
>$Path=/". Illegal domain attribute "http". Domain of origin: 
>"http://www.*******.com"
>
>I have replaced the real site name with *, now httpclient can't set the 
>cookie because the domain is not valid. The strange thing is when I do the 
>same browing using IE and HttpWatch to look at the cookies the domain is 
>just *******.com which is valid and therefore no problem. How come I get a 
>different cookie with httpclient?
>
>I have tried setting the user agent to "Mozilla/4.0 (compatible; MSIE 6.0; 
>Windows NT 5.1; SV1)" which is the same as IE, same result. I have tried 
>all the standard cookie policies, same thing.
>
>Is there an easy way around this or do I need to manually create all the 
>cookies.
>
>Thanks
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org