public ReplyInterface ingoingFilter(RequestInterface req) {
Request request = (Request) req;
if(request.getMethod().equals("PUT")) {
try {
MimeType req_mt = request.getContentType();
if (xhtml_mt == null){
xhtml_mt = new MimeType("application","xhtml+xml");
}
if (req_mt.match(xhtml_mt) != MimeType.NO_MATCH) {
isXhtml = true ;
} else {
isXhtml = false ;
}
if (req_mt.match(MimeType.TEXT_HTML) == MimeType.NO_MATCH
&& isXhtml == false){
return null;
}
if (req_mt.hasParameter("charset")){
String charset = req_mt.getParameterValue("charset");
if (charset.equalsIgnoreCase("iso-2022-jp")){
tidyCharEncoding = Configuration.ISO2022 ;
}
if (charset.equalsIgnoreCase("us-ascii")){
tidyCharEncoding = Configuration.ASCII ;