tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml
Date Thu, 19 Feb 2004 21:37:27 GMT
markt       2004/02/19 13:37:27

  Modified:    catalina/src/conf web.xml
               catalina/src/share/org/apache/catalina/servlets
                        CGIServlet.java
               webapps/docs cgi-howto.xml
  Log:
  Fix bug 27090. Make parameter encoding configurable. Default remains as is. Update docs.
  Add executable paramater to docs.
  
  Revision  Changes    Path
  1.36      +4 -0      jakarta-tomcat-catalina/catalina/src/conf/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/web.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- web.xml	18 Feb 2004 21:24:45 -0000	1.35
  +++ web.xml	19 Feb 2004 21:37:27 -0000	1.36
  @@ -272,6 +272,10 @@
     <!--   executable          Name of the exectuable used to run the script. -->
     <!--                       [perl]                                         -->
     <!--                                                                      -->
  +  <!--   parameterEncoding   Name of parameter encoding to be used with CGI -->
  +  <!--                       servlet.                                       -->
  +  <!--                       [System.getProperty("file.encoding","UTF-8")]  -->
  +  <!--                                                                      -->
     <!-- IMPORTANT: To use the CGI servlet, you also need to rename the       -->
     <!--            $CATALINA_HOME/server/lib/servlets-cgi.renametojar file   -->
     <!--            to $CATALINA_HOME/server/lib/servlets-cgi.jar             -->
  
  
  
  1.16      +14 -9     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
  
  Index: CGIServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CGIServlet.java	16 Feb 2004 23:40:42 -0000	1.15
  +++ CGIServlet.java	19 Feb 2004 21:37:27 -0000	1.16
  @@ -315,6 +315,10 @@
       /** the command to use with the script */
       private String cgiExecutable = "perl";
       
  +    /** the encoding to use for parameters */
  +    private String parameterEncoding = System.getProperty("file.encoding",
  +                                                          "UTF-8");
  +
       /** object used to ensure multiple threads don't try to expand same file */
       static Object expandFileLock = new Object();
   
  @@ -766,7 +770,8 @@
                   String param = paramNames.nextElement().toString();
                   if (param != null) {
                       queryParameters.put(
  -                        param, URLEncoder.encode(req.getParameter(param)));
  +                        param, URLEncoder.encode(req.getParameter(param),
  +                                                 parameterEncoding));
                   }
               }
   
  @@ -1658,7 +1663,7 @@
                       if ((k.indexOf("=") < 0) && (v.indexOf("=") < 0)) {
                           StringBuffer arg = new StringBuffer(k);
                           arg.append("=");
  -                        v = java.net.URLEncoder.encode(v);
  +                        v = java.net.URLEncoder.encode(v, parameterEncoding);
                           arg.append(v);
                           if (arg.toString().indexOf(" ") < 0) {
                               cmdAndArgs.append(arg);
  
  
  
  1.4       +5 -0      jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml
  
  Index: cgi-howto.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- cgi-howto.xml	12 Feb 2004 16:51:36 -0000	1.3
  +++ cgi-howto.xml	19 Feb 2004 21:37:27 -0000	1.4
  @@ -61,6 +61,11 @@
   Default is <code>100</code> seconds.</li>
   <li><strong>debug</strong> - Debugging detail level for messages logged
   by this servlet. Default 0.</li>
  +<li><strong>executable</strong> - The of the executable to be used to
  +run the script. Default is <code>perl</code>.</li>
  +<li><strong>parameterEncoding</strong> - Name of the parameter encoding
  +to be used with the GCI servlet. Default is
  +<code>System.getProperty("file.encoding","UTF-8")</code>.</li>
   </ul>
   </p>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message