tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
Date Fri, 19 Nov 2004 14:44:42 GMT
yoavs       2004/11/19 06:44:42

  Modified:    catalina/src/share/org/apache/catalina/servlets
                        CGIServlet.java
               webapps/docs changelog.xml
  Log:
  Bugzilla 32023: CGIServlet fails to handle post message with multipart/form data
  
  Revision  Changes    Path
  1.28      +13 -6     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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- CGIServlet.java	14 Oct 2004 08:14:47 -0000	1.27
  +++ CGIServlet.java	19 Nov 2004 14:44:42 -0000	1.28
  @@ -1691,7 +1691,14 @@
               ByteArrayOutputStream contentStream = null;
               if(!"".equals(sContentLength)) {
                   byte[] content = new byte[Integer.parseInt(sContentLength)];
  -                int lenRead = stdin.read(content);
  +
  +                // Bugzilla 32023
  +                int lenRead = 0;
  +                do {
  +                    int partRead = stdin.read(content,lenRead,content.length-lenRead);
  +                    lenRead += partRead;
  +                } while (lenRead > 0 && lenRead < content.length);
  +
                   contentStream = new ByteArrayOutputStream(
                           Integer.parseInt(sContentLength));
                   if ("POST".equals(env.get("REQUEST_METHOD"))) {
  
  
  
  1.173     +3 -0      jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.172
  retrieving revision 1.173
  diff -u -r1.172 -r1.173
  --- changelog.xml	19 Nov 2004 14:30:21 -0000	1.172
  +++ changelog.xml	19 Nov 2004 14:44:42 -0000	1.173
  @@ -52,6 +52,9 @@
         <fix>
           <bug>32082</bug>: Added protected getPrincipals method to MemoryRealm
for easier extension. (yoavs)
         </fix>
  +      <fix>
  +        <bug>32023</bug>: CGIServlet fails to handle post message with multipart/form
data. (yoavs)
  +      </fix>
       </changelog>
     </subsection>
   
  
  
  

---------------------------------------------------------------------
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