Markus Schönhaber wrote:
Mark Thomas wrote:
That said I wouldn't be against a patch that introduced a
useFileEncodingInCharset parameter (although a shorter name would be better
;)
Great! I'll dig into DefaultServlet's source and see what I can come up
with.
OK, I think I have, by and
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Markus,
Markus Schönhaber wrote:
| OK, I think I have, by and large, understood how the DefaultServlet
| works and added code to append the charset info (if wanted and
| applicable) to the Content-Type response header.
| What I ended up with is the
Christopher Schultz wrote:
Have you rigged the servlet to add a static charset defined in, say,
web.xml or something like that?
In a way, yes. DefaultServlet already uses the value of the fileEncoding
init-param, if set, as encoding when reading static content from disk.
So, if fileEncoding is
Hi,
AFAICT Tomcat's DefaultServlet doesn't add ; charset=... to the
Content-Type header when serving static resources of content type text/*
and the corresponding resource isn't encoded in ISO-8859-1.
As I understand it, this is a violation of the HTTP 1.1 spec, since RFC
2616 says in section
Markus Schönhaber wrote:
Hi,
AFAICT Tomcat's DefaultServlet doesn't add ; charset=... to the
Content-Type header when serving static resources of content type text/*
and the corresponding resource isn't encoded in ISO-8859-1.
Correct.
As I understand it, this is a violation of the HTTP 1.1
Mark Thomas wrote:
As I understand it, this is a violation of the HTTP 1.1 spec, since RFC
2616 says in section 3.7.1:
| The charset parameter is used with some media types to define the
| character set (section 3.4) of the data. When no explicit charset
| parameter is provided by the
Markus Schönhaber wrote:
Hi,
(provided, the
browser doesn't do some guessing of the charset based on the content).
Not in any way to distract from your main question, which is very
interesting, but that is a very big provided, because IE does a lot of
second-guessing the server, infamously.
André Warnier wrote:
Markus Schönhaber wrote:
(provided, the
browser doesn't do some guessing of the charset based on the content).
Not in any way to distract from your main question, which is very
interesting, but that is a very big provided, because IE does a lot of
second-guessing the