tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets SsiInvokerServlet.java
Date Mon, 22 Oct 2001 21:35:48 GMT
bip         01/10/22 14:35:48

  Modified:    catalina/src/share/org/apache/catalina/servlets Tag:
                        tomcat_40_branch SsiInvokerServlet.java
  Log:
  Bugfixes
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.1   +23 -6     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.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- SsiInvokerServlet.java	2001/07/22 20:25:11	1.8
  +++ SsiInvokerServlet.java	2001/10/22 21:35:48	1.8.2.1
  @@ -1,8 +1,8 @@
   /*
    * SsiInvokerServlet.java
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v
1.8 2001/07/22 20:25:11 pier Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/07/22 20:25:11 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v
1.8.2.1 2001/10/22 21:35:48 bip Exp $
  + * $Revision: 1.8.2.1 $
  + * $Date: 2001/10/22 21:35:48 $
    *
    * ====================================================================
    *
  @@ -99,7 +99,7 @@
    *
    * @author Bip Thelin
    * @author Amy Roh
  - * @version $Revision: 1.8 $, $Date: 2001/07/22 20:25:11 $
  + * @version $Revision: 1.8.2.1 $, $Date: 2001/10/22 21:35:48 $
    */
   public final class SsiInvokerServlet extends HttpServlet {
       /** Debug level for this servlet. */
  @@ -111,6 +111,8 @@
       /** Expiration time in seconds for the doc. */
       private Long expires = null;
   
  +    /** Should we ignore unsupported/misspelled SSI Directives */
  +    private boolean ignoreUnsupportedDirective = false;
   
       /** virtual path can be webapp-relative */
       private boolean isVirtualWebappRelative = false;
  @@ -143,8 +145,19 @@
               ;
           }
   
  -        value = getServletConfig().getInitParameter("isVirtualWebappRelative");
  -        isVirtualWebappRelative = Integer.parseInt(value) > 0 ? true : false;
  +        try {
  +            value = getServletConfig().getInitParameter("isVirtualWebappRelative");
  +            isVirtualWebappRelative = Integer.parseInt(value) > 0 ? true : false;
  +        } catch (Throwable t) {
  +            ;
  +        }
  +
  +        try {
  +            value = getServletConfig().getInitParameter("ignoreUnsupportedDirective");
  +            ignoreUnsupportedDirective = Integer.parseInt(value) > 0 ? true : false;
  +        } catch (Throwable t) {
  +            ;
  +        }
   
           try {
               value = getServletConfig().getInitParameter("expires");
  @@ -235,6 +248,8 @@
               return;
           }
   
  +        res.setContentType("text/html;charset=UTF-8");
  +
           if (expires != null) {
               res.setDateHeader("Expires", (
                   new java.util.Date()).getTime() + expires.longValue() * 1000);
  @@ -306,6 +321,8 @@
                               out.write((ssiCommand.getStream(strParamType, strParam)).getBytes());
                           } else
                               ssiCommand.process(strParamType, strParam);
  +                    } else if(ignoreUnsupportedDirective && ssiCommand==null) {
  +                        ;
                       } else {
                           out.write(ssiMediator.getError());
                       }
  
  
  

Mime
View raw message