amyroh 01/11/12 16:09:41 Modified: catalina/src/share/org/apache/catalina/servlets SsiInvokerServlet.java Log: Fix content type error. Bug 4674 submitted by [EMAIL PROTECTED] Revision Changes Path 1.13 +18 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java Index: SsiInvokerServlet.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- SsiInvokerServlet.java 2001/10/26 19:36:08 1.12 +++ SsiInvokerServlet.java 2001/11/13 00:09:41 1.13 @@ -1,8 +1,8 @@ /* * SsiInvokerServlet.java - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v 1.12 2001/10/26 19:36:08 bip Exp $ - * $Revision: 1.12 $ - * $Date: 2001/10/26 19:36:08 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v 1.13 2001/11/13 00:09:41 amyroh Exp $ + * $Revision: 1.13 $ + * $Date: 2001/11/13 00:09:41 $ * * ==================================================================== * @@ -99,7 +99,7 @@ * * @author Bip Thelin * @author Amy Roh - * @version $Revision: 1.12 $, $Date: 2001/10/26 19:36:08 $ + * @version $Revision: 1.13 $, $Date: 2001/11/13 00:09:41 $ */ public final class SsiInvokerServlet extends HttpServlet { /** Debug level for this servlet. */ @@ -227,6 +227,7 @@ ServletContext servletContext = getServletContext(); String path = getRelativePath(req); + URL resource = servletContext.getResource(path); SsiEnvironment ssiEnv = null; StringBuffer command = new StringBuffer(); @@ -263,8 +264,20 @@ ssiEnv = SsiEnvironment.createSsiEnvironment(servletContext, req, res, path); ssiEnv.setIsVirtualWebappRelative(isVirtualWebappRelative); + + // Find content type. + String contentType = + getServletContext().getMimeType(path); + + // Set the appropriate output headers + if (contentType != null) { + if (debug > 0) + log("DefaultServlet.serveFile: contentType='" + + contentType + "'"); + res.setContentType(contentType); + } - res.setContentType("text/html;charset=UTF-8"); + // res.setContentType("text/html;charset=UTF-8"); if (expires != null) { res.setDateHeader("Expires", (
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>