tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http Parameters.java
Date Sat, 05 Apr 2003 08:19:28 GMT
remm        2003/04/05 00:19:28

  Modified:    util/java/org/apache/tomcat/util/http Tag: coyote_10
                        Parameters.java
  Log:
  - Port patch to Tomcat 4.1.x (fix params restore with FORM auth).
  - Submitted by Jeff Tulley.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.1   +20 -0     jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/Parameters.java
  
  Index: Parameters.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/Parameters.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- Parameters.java	29 Jun 2002 02:15:02 -0000	1.8
  +++ Parameters.java	5 Apr 2003 08:19:28 -0000	1.8.2.1
  @@ -190,6 +190,26 @@
       
       // This is the original data representation ( hash of String->String[])
   
  +    public void addParameterValues( String key, String[] newValues) {
  +        if( key==null ) return;
  +        String values[];
  +        if (paramHashStringArray.containsKey(key)) {
  +            String oldValues[] = (String[])paramHashStringArray.
  +                get(key);
  +            values = new String[oldValues.length + newValues.length];
  +            for (int i = 0; i < oldValues.length; i++) {
  +                values[i] = oldValues[i];
  +            }
  +            for (int i = 0; i < newValues.length; i++) {
  +                values[i+ oldValues.length] = newValues[i];
  +            }
  +        } else {
  +            values = newValues;
  +        }
  +
  +        paramHashStringArray.put(key, values);
  +    }
  +
       public String[] getParameterValues(String name) {
   	handleQueryParameters();
   	// sub-request
  
  
  

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