users@jsr311.java.net

Re: ResponseBuilder.header("SET_COOKIE", null)

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 18 Jun 2008 09:42:21 -0400

On Jun 18, 2008, at 9:34 AM, Stephan Koops wrote:
>>> what should happen, if ResponseBuilder.header("SET_COOKIE", null)
>>> is called? Remove all given NewCookies? Only one? But which one?
>> I think the only good answers are:
>>
>> (i) remove all of them, or
>> (ii) do nothing
> i: IMO remove all is the best.
>>> And what if ResponseBuilder.cookie(null) is called? Also remove
>>> all given NewCookies?
>> That method takes an array, should it be the same result for a zero
>> length array ?
> If the array is empty (length==0), it seems useful to me to do
> nothing. But if the array is null, it seems useful to me to remove
> the elements.
>
That was my conclusion too. Anybody have a different opinion ?

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.