views:

62

answers:

1

Hi,

I'm using Tomcat 6.0.20, HttpServlet

my servlet code are as followings :-

response.setContentType("application/xml; charset=utf-8");

but each time i will got the content type as :

application/xml;charset=utf-8

which is without the space between " ; ".

May i know how to bypass the space being trimmed?

Is there anyway to do so (eg : modify the servet-api.jar)?

+1  A: 

It could be happening in Tomcat, in a reverse proxy in front of Tomcat, in a proxy, a firewall or somewhere in the client-side stack. It is probably impossible to stop whatever is doing this.

But it should not matter. The HTTP standard says that there is optional whitespace after the semicolon. Your client-side code should work whether the space is present or not.

Stephen C