hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: problem with cookie set by javascript
Date Sun, 01 May 2005 12:11:22 GMT
Ganime,

Could you produce a complete wire log of the HTTP session (see this
document for details
<http://jakarta.apache.org/commons/httpclient/3.0/logging.html>?

I suspect the cookies are not included in the request due to a mismatch
between the domain attribute of the cookie and the host name of the
target server

Cheers,

Oleg


On Fri, 2005-04-29 at 10:56 +0300, Ganime Betül AKIN wrote:
> Hello,
> I am trying to browse thru a site. The first page contains javascript 
> that checks my user-agent info and sets some cookies by using the following
> 
> document.cookie = "icaClientCode=" + icaClientCode;
> document.cookie = "icaObjectCode=" + icaObjectCode;
> document.cookie = "icaBrowserCode=" + icaBrowserCode;
> document.cookie = "icaScreenResolution=" + strResolution
> 
> so, what I am doing it, I am manually setting the cookies
> 
> client.getState().addCookie(new Cookie("3000xtra.glbl1.reuters.com", 
> "icaObjectCode", "1","/asp/", null,false));
> client.getState().addCookie(new Cookie("3000xtra.glbl1.reuters.com", 
> "icaClientCode", "1", "/asp/", null,false));
> client.getState().addCookie(new Cookie("3000xtra.glbl1.reuters.com", 
> "icaScreenResolution", "12800x960", "/asp/", null,false));
> client.getState().addCookie(new Cookie("3000xtra.glbl1.reuters.com", 
> "icaBrowserCode", "2","/asp/", null,false));
> 
> 
> But when I post to the next page, I get the error
> 
> Internal Server Error
>  <font face="Arial" size=2>
> <p>Microsoft VBScript runtime </font> <font face="Arial" size=2>error

> '800a000d'</font>
> <p>
> <font face="Arial" size=2>Type mismatch: 'icaObjectCode'</font>
> <p>
> <font face="Arial" size=2>/asp/include/login.vbs</font><font 
> face="Arial" size=2>, line 34</font>
> 
> well I managed to download this login.vbs and the problem seems to be in 
> the lines
> 
>    Dim icaObjectCode
>     icaObjectCode = Request.Cookies("icaObjectCode")
>     If Len(icaObjectCode) > 0 Then
>         isIE = CBool(icaObjectCode = 1)
>     Else
>         isIE = false
>     End If
> End Sub
> 
> it must be a mismatch with the value I assign to icaObjectCode. Bu how 
> do I get around this problem?
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message