You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Scott Nichol <sn...@scottnichol.com> on 2002/06/07 08:36:54 UTC

[PATCH] Session Scope and Cookies

Here's my patch.  Attached is a diff for SOAPHTTPConnection and a new file for
org.apache.soap.transport.http.Cookie.

I have tested this locally with samples.addressbook2.Main to confirm that it
does not break the existing functionality.  I have also tested the new Cookie
class with a test harness to verify many of its behaviors vis-a-vis the cookie
RFCs.  However, I will leave it up to Swami and the community to actually break
it ;).

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Thursday, June 06, 2002 2:45 PM
Subject: Re: Session Scope and Cookies


> I'll give this a try.
>
> Scott Nichol
> ----- Original Message -----
> From: "K. Swaminathan" <sw...@instantis.com>
> To: <so...@xml.apache.org>
> Sent: Thursday, June 06, 2002 2:11 PM
> Subject: RE: Session Scope and Cookies
>
>
> > ->If its an issue with SOAP 2.2 its not solved with 2.3. I wrote the
> > ->cookie stuff with the expectation that there would be only one (I
> > ->don't recall my mental state then but probably it was a combination
> > ->of lack of understanding and laziness ;-)).
> >
> > ->Can you submit a patch to fix it?
> > The cleaner fix to this requires some dissection on, HttpUtils,
> > TransportMessage, and SOAPHttpConnection, to make sure that
> > the hashtable that contains the header values, stores all the
> > Set-Cookie/Set-Cookie2 values, (perhaps in a String[] instead
> > of a String).
> > The Http-Spec seems to expects you to 'comma separate' these
> > multiple values and set them as a single(!!!) header in the request.
> >
> >
> > Can someone who is more familiar with the code/specs, volunteer.
> >
> > thanks
> > Swami K.
> >
> > ->
> > ->Bye,
> > ->
> > ->Sanjiva.
> > ->
> > ->----- Original Message -----
> > ->From: "K. Swaminathan" <sw...@instantis.com>
> > ->To: <so...@xml.apache.org>
> > ->Sent: Wednesday, June 05, 2002 5:44 AM
> > ->Subject: Session Scope and Cookies
> > ->
> > ->
> > ->>
> > ->>  The SOAPHttpConnection.java, seems to remember and restore
> > ->only a single
> > ->> entry
> > ->>  for the Set-Cookie and Set-Cookie2 header fields, whereas the
> > ->spec allows
> > ->> for
> > ->>  more than one to be present.
> > ->>
> > ->>  Is this a solved issue in SOAP 2.3??
> > ->>
> > ->> thanks
> > ->> Swami K.
> > ->>
> > ->>
> > ->> >One thing to point out, this is a CLIENT side issue not a server side
> > ->> issue.
> > ->> >
> > ->> >It does appear to be correct that multiple entries can be sent in the
> > ->same
> > ->> >"Cookie:" value, but in terms of storing an manipulating them
> > ->this has to
> > ->> be
> > ->> >done outside of the XML-SOAP code.  (Thanks for that one Scott).
> > ->> >
> > ->> >On the non-passing of the transport headers, this is still there in the
> > ->> >current nightly build.  This does appear to be a minor
> > ->bug-ette.  Is the
> > ->> fix
> > ->> >that sends the headers from the transport acceptable ?
> > ->> >
> > ->> >Steve
> > ->> >
> > ->> > -----Original Message-----
> > ->> > From: Steve Jones [SMTP:steve.jones@netdecisions.co.uk]
> > ->> > Sent: 04 April 2001 16:45
> > ->> > To: Soap-Dev (E-mail)
> > ->> > Subject: Session scope and cookies...
> > ->> >
> > ->> >...
> > ->> > The problem is that because the headers is a hashtable indexed by the
> > ->key
> > ->> > then only one cookie can be sent.  This is fine for my example as the
> > ->only
> > ->> > cookie is the JSESSIONID, if however another cookie was sent
> > ->it would be
> > ->> > up
> > ->> > for grabs which one is sent back.
> > ->> >
> > ->> > What should I really have done ?
> > ->> >
> > ->> > Steve
> > ->
> > ->
> >
> >
>
>