Re: DefaultServlet and default character encoding

2010-06-18 Thread Rainer Jung
On 18.06.2010 13:50, Felix Schumacher wrote: On Fri, 18 Jun 2010 12:50:31 +0200, Rainer Jung wrote: On 18.06.2010 11:04, Felix Schumacher wrote: On Thu, 17 Jun 2010 19:32:36 +0400, Konstantin Kolinko wrote: 2010/6/17 Felix Schumacher: apache httpd thinks it would be better to append a char

Re: DefaultServlet and default character encoding

2010-06-18 Thread Felix Schumacher
On Fri, 18 Jun 2010 12:50:31 +0200, Rainer Jung wrote: > On 18.06.2010 11:04, Felix Schumacher wrote: >> On Thu, 17 Jun 2010 19:32:36 +0400, Konstantin Kolinko >> wrote: >>> 2010/6/17 Felix Schumacher: For the moment I have written a filter, which sets a default encoding, >> as soon as

Re: DefaultServlet and default character encoding

2010-06-18 Thread Rainer Jung
On 18.06.2010 11:04, Felix Schumacher wrote: On Thu, 17 Jun 2010 19:32:36 +0400, Konstantin Kolinko wrote: 2010/6/17 Felix Schumacher: For the moment I have written a filter, which sets a default encoding, as soon as Response.setContentType(String type) is called and type.startsWith("text/"

Re: DefaultServlet and default character encoding

2010-06-18 Thread Felix Schumacher
On Thu, 17 Jun 2010 19:32:36 +0400, Konstantin Kolinko wrote: > 2010/6/17 Felix Schumacher : >> For the moment I have written a filter, which sets a default encoding, as >> soon as Response.setContentType(String type) is called and >> type.startsWith("text/"). That works for the moment, but I woul

Re: DefaultServlet and default character encoding

2010-06-17 Thread Konstantin Kolinko
2010/6/17 Felix Schumacher : > For the moment I have written a filter, which sets a default encoding, as > soon as Response.setContentType(String type) is called and > type.startsWith("text/"). That works for the moment, but I would prefer the > solution described in above thread. I know that sett

Re: DefaultServlet and default character encoding

2010-06-17 Thread Mark Thomas
On 17/06/2010 15:23, Felix Schumacher wrote: > My Question now is, should I file a bug to enhance DefaultServlet? If so > would it be legal to include the patch from that discussion? That is covered by section 5 of the ALv2, so yes it would be legal. Make sure you correctly attribute it. I'd add t

DefaultServlet and default character encoding

2010-06-17 Thread Felix Schumacher
Hi, I have a character encoding problem with the DefaultServlet. We use it to serve static html content, which is encoded in utf-8. The DefaultServlet doesn't set characterset in the response, so the browser looks for a meta-tag describing the encoding. Luckily these are set in our content and t