You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Gerry Gao (JIRA)" <ax...@ws.apache.org> on 2005/06/13 14:27:47 UTC

[jira] Updated: (AXIS-895) Axis doesn't maintain more than one cookie with http

     [ http://issues.apache.org/jira/browse/AXIS-895?page=all ]

Gerry Gao updated AXIS-895:
---------------------------

    Attachment: HTTPSender.java

Hi,
This is the patch on ws-axis/java for the HTTPSender and CommonsHTTPSender about the multicookies.
The key point is to use HashMap to store cookies and store cookies in key, value pair way. his will buy us non-duplicated cookie with same key.
And this do solve the CommonsHTTPSender's maintaining session problem.

For example:
The patch make them behave like:

request 1:
<no cookie>
respones 1:
Set-Cookie: JSESSIONID=14qbbc5mptua2;Path=/axis
Set-Cookie: a=a
Set-Cookie: b=b

request 2:
Cookie: JSESSIONID=14qbbc5mptua2
Cookie: a=a
Cookie: b=b
respnonse 2:
Set-Cookie: a=a1
Set-Cookie: c=c

request 3:
Cookie: JSESSIONID=14qbbc5mptua2
Cookie: b=b
Cookie: a=a1
Cookie: c=c

Gerry

> Axis doesn't maintain more than one cookie with http
> ----------------------------------------------------
>
>          Key: AXIS-895
>          URL: http://issues.apache.org/jira/browse/AXIS-895
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.0-rc2
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: Daniel Desmeules
>  Attachments: CommonsHTTPSender.java.from1_2-RC3.patch, CommonsHTTPSender.java.patch, HTTPSender.java, HTTPSender.java.patch, HTTPSender.java.patch
>
> I started testing out deployment with a load balancer (F5) which adds its own 
> cookie to the http requests. There is also the tomcat cookie (JSESSIONID) added 
> by the server. When I send the next request from the axis client, only the last 
> cookie is sent.
> Output from tcpmon:
> Response from first request:
> HTTP/1.1 200 OK
> Set-Cookie: BIGipServerEngCTI=2365653770.49695.0000; expires=Tue, 27-May-2003 
> 17:54:17 GMT; path=/
> Set-Cookie: JSESSIONID=ZL9dl3tfxkRAzPtdfEVJlQ**.tomcat1; Path=/axis
> Content-Type: text/xml; charset=utf-8
> Date: Tue, 27 May 2003 17:14:17 GMT
> Server: Apache Coyote/1.0
> Connection: close
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <ns1:newSessionResponse 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
> xmlns:ns1="urn:NuanceCTI"/>
>  </soapenv:Body>
> </soapenv:Envelope>
> Next client request with maintainSession set to true:
> POST /axis/services/NuanceCTI HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related, text/*
> User-Agent: Axis/1.1
> Host: 10.3.0.22
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: ""
> Content-Length: 1515
> Cookie: JSESSIONID=ZL9dl3tfxkRAzPtdfEVJlQ**.tomcat1
> ....
> I will try to fix it here since I need it to work soon and send the fix back 
> (If I find how to do that)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira