tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util RequestUtil.java
Date Tue, 12 Dec 2000 07:50:17 GMT
remm        00/12/11 23:50:17

  Modified:    catalina/src/share/org/apache/catalina/util RequestUtil.java
  Log:
  - Minor fix : will handle quoted charset names.
  
  Revision  Changes    Path
  1.10      +8 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/RequestUtil.java
  
  Index: RequestUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/RequestUtil.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- RequestUtil.java	2000/11/15 00:52:45	1.9
  +++ RequestUtil.java	2000/12/12 07:50:16	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/RequestUtil.java,v
1.9 2000/11/15 00:52:45 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2000/11/15 00:52:45 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/RequestUtil.java,v
1.10 2000/12/12 07:50:16 remm Exp $
  + * $Revision: 1.10 $
  + * $Date: 2000/12/12 07:50:16 $
    *
    * ====================================================================
    *
  @@ -79,7 +79,7 @@
    * General purpose request parsing and encoding utility methods.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.9 $ $Date: 2000/11/15 00:52:45 $
  + * @version $Revision: 1.10 $ $Date: 2000/12/12 07:50:16 $
    */
   
   public final class RequestUtil {
  @@ -166,6 +166,10 @@
   	int end = encoding.indexOf(";");
   	if (end >= 0)
   	    encoding = encoding.substring(0, end);
  +        encoding = encoding.trim();
  +        if ((encoding.length() > 2) && (encoding.startsWith("\"")) 
  +            && (encoding.endsWith("\"")))
  +            encoding = encoding.substring(1, encoding.length() - 1);
   	return (encoding.trim());
   
       }
  
  
  

Mime
View raw message