dev@glassfish.java.net

Duplicate http headers

From: Ashish Sahni <Ashish.Sahni_at_Sun.COM>
Date: Wed, 31 Jan 2007 16:42:06 -0800

Hi,
I have a web application that passes the
httpservletresponse(outputstream actually)
to an external lib/code that I don't have control over.
The application seems to be working correctly other than the fact that
the http headers
are duplicated in the response(see below).
I remember seeing a discussion on http-header-duplication but can't seem
to find it
and nothing seems to jump out in API docs.

How do I prevent the webcontainer from 'committing' the http response
headers ?

Thanks
Ashish


HTTP/1.x 200 OK
X-powered-by: Servlet/2.5
Content-Type: text/plain; charset=iso-8859-1
Transfer-Encoding: chunked
Date: Wed, 31 Jan 2007 23:52:02 GMT

HTTP/1.1 200 OK
Date: Wed, 31 Jan 2007 23:52:02 GMT
Content-Type: text/html
Set-Cookie: _session_id=253bb5948d11ecf0671e4af2bb9b2cee; path=/
Status: 200 OK
Cache-Control: no-cache