larryi      01/06/11 13:34:48

  Modified:    src/share/org/apache/jasper/servlet JspServlet.java
  Log:
  Minor update to previous commit.  The previous commit contains a change
  I had planned to commit separately.  This change was to port an
  improvement found in the JspInterceptor.
  
  The improvement is to avoid violating the "post data must remain available"
  requirement found in section 5.1 of the servlet 2.2 spec when trying to
  determine if "jsp_precompile" is specified.  Parameters are obtained from the
  request only if "jsp_precompile" is found in the query string.  Also, the query
  parameters will not be logged if "jsp_precompile" is not found and the request
  method is "POST".
  
  This means that putting a "jsp_precompile" parameter in POST data will no
  longer work.  I'd don't believe this violates the intent of the spec with respect
  to "jsp_precompile" nor is likely to cause any hardship.
  
  Revision  Changes    Path
  1.10      +2 -1      
jakarta-tomcat/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JspServlet.java   2001/06/11 03:42:30     1.9
  +++ JspServlet.java   2001/06/11 20:34:46     1.10
  @@ -500,7 +500,8 @@
                    jasperLog.log("\t      RequestURI: "+request.getRequestURI());
                    jasperLog.log("\t     QueryString: "+request.getQueryString());
                    jasperLog.log("\t  Request Params: ");
  -                    if ( request.getMethod().equals("POST") )
  +                    // If not precompiling and method is POST, avoid reading POST 
data.
  +                    if ( !precompile && request.getMethod().equals("POST") )
                           jasperLog.log("Parameters not read because method is POST");
                       else {
                           Enumeration e = request.getParameterNames();
  
  
  

Reply via email to