users@jsr311.java.net

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

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

On Jun 18, 2008, at 6:56 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

>
> 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 ? I think the semantic of that method should be to add a
Set-Cookie header so if you call it multiple times you get the same as
calling it once with an array of NewCookies.

> ResponseBuilder.header(..) has this semantic generally?
>
Consistency is good so it would have to be the same semantic as for
all headers.

Marc.

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