Hi,
I'm trying to find a way to remove response headers from the default set
of response headers that Tomcat sends back to the browser with each
request. From my analysis here's what Tomcat sends back by default on
most requests:
HTTP/1.1 200 OK
Content-Type: text/html;ISO-8859-1
Date: Wed, 30 Oct 2002 03:09:21 GMT
Server: Apache Tomcat/4.0.4 (HTTP/1.1 Connector)
Transfer-Encoding: chunked
Set-Cookie: JSESSIONID=E0A77CD43161227E989CE9C0BA3C6D8F;Path=/cc
[body of the request here]
I'd like to be able to get rid of the Date, Server and Set-Cookie
header. I don't see anyway to do this using the methods provided on
HttpServletResponse. That object only has methods for adding header
fields. I briefly investigated using a filter to do this, but I don't a
filter will give me access to the header part of the response, only the
main body of the HTTP response. I may be wrong about this, so please
correct me if you know otherwise.
Why do I want to do this? I'm writing an application for the J2ME MIDP
specification which is to run on Palm Pilot devices. I'm doing
performance testing and the Palm Pilot is spending a significant amount
of time processing the response headers that are coming into it as
responses from web pages that it is requesting from my Tomcat server.
My testing indicates that it takes the Palm Pilot approximately 1/2 of a
second to process each additional response header. This adds up to a
lot of extra air time and unnecessary processing time. I need to
minimize the amount of data that is transmitted between the Palm Pilot
and the server so that it runs as fast as possible. The way I arrived
at the 1/2 of a second per response header figure was by adding extra
headers to the request and timing how much longer than normal the
processing took.
I'm hoping someone can tell me if this is possible or not.
Thank you for your assistance.
Alex.
--
To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
- Re: Removing Response Headers Alex Muc
- Re: Removing Response Headers Jacob Kjome
- Re: Removing Response Headers Craig R. McClanahan