On 23 December 2014 at 11:27, Stuart Douglas <sdouglas_at_redhat.com> wrote:
> In Undertow setHeader with null will wipe the header, addHeader will do
> nothing, and containsHeader will return true if setHeader(null) had been
> called.
Jetty does the same. Or to be more precise a set header will remove the
previous value and then ignore the null and not set a new value.
While I don't see any massive use-case to allow removing headers, I don't
see a good reason for not doing it either. Apps can break things just as
easily by adding/setting headers as by removing them, so no extra danger
there. Plus they have the power to wrap if they want, so nothing new.
So I don't think we need a new delete header method, but I do think we
should define what a null value does. I think that the behaviour as
described by Stuart is reasonable.
cheers
--
Greg Wilkins <gregw_at_intalio.com> @ Webtide - *an Intalio subsidiary*
http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that scales
http://www.webtide.com advice and support for jetty and cometd.