I don't know if this is the best place to post this question or not.
The question is, How to enforce Firefox to send the Conent-Type
request header to the server.
As I am working with tomcat server, and he expects the encoding to be
sent in the Content-Type request header, here's the code snippet from
tomcat 5.0.28 code:
// this method called by the developer to get the character encoding
of the request
public String getCharacterEncoding() {
if (charEncoding != null)
return charEncoding;
charEncoding =
ContentType.getCharsetFromContentType(getContentType());
return charEncoding;
}
// and see, this method takes the character encoding from charset sent
in Content-Type request header.
public static String getCharsetFromContentType(String type) {
if (type == null) {
return null;
}
int semi = type.indexOf(";");
if (semi == -1) {
return null;
}
int charsetLocation = type.indexOf("charset=", semi);
if (charsetLocation == -1) {
return null;
}
String afterCharset = type.substring(charsetLocation + 8);
afterCharset = afterCharset.replace('"', ' ');
String encoding = afterCharset.trim();
return encoding;
}
But, unfortunately, firefox doesn't appear to sent "Content-Type"
request header ?!!
Please help!!
For what kind of request?
-Boris