JSESSIONID cookie not set with hostname

1k views Asked by At

I've encountered a wierd cookie behavior. I have python client which logs in to a remote server and executes a servlet code over there. But unfortunately I am not able to get the Set-Cookie:JSESSIONID back from the server. I was able to fix this problem by specifying the remote machine's IP address instead of it's hostname during the login.

Does anyone have an explanation for this behavior?

I am using this code in the client:

rdr_hndlr = self.RedirectHandler()
rdr_hndlr.set_rep_data(rep_data)
opnr = urllib2.build_opener(rdr_hndlr)
rep_rq = urllib2.Request(rep_servlet, rep_data)
try:
    res = opnr.open(rep_rq)
...

P.S. the hostnames and other network configurations are correctly configured as other Python clients are able to connect using the hostname from this machine to the server.

Thanks!

0

There are 0 answers