Jeff Tulley wrote:
One more try, all files as .txt  What is the best way to send a .zip
file?
Actually, I've attached the file that was in the zip as
AddParametersTest.java  It should go in
j-t-c/util/test/org/apache/tomcat/util/http   Nothing from /test down
currently exists in the util dir.

It looks like my previous submissions on this list also did not show
up.  I should have checked more carefully.

I've also attached my patch for the minor type in SoTask.java

Sorry for the mess.

Upon more examination, it seems there's not much choice (unfortunately), and I'll have to agree on most of the patch.


Index: Request.java
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java,v
retrieving revision 1.15
diff -u -r1.15 Request.java
--- Request.java 19 Sep 2002 06:39:43 -0000 1.15
+++ Request.java 3 Apr 2003 17:28:56 -0000
@@ -385,6 +385,9 @@
public Parameters getParameters() {
return parameters;
}
+ public void addParameter(String name, String[] values) {
+ parameters.addParameterValues(name, values);
+ }
// -------------------- Other attributes --------------------

This is not needed. getParamters().addParameterValues(name, values); will be used instead (there's no getParamter instead).


Index: Parameters.java
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/Parameters.java,v
retrieving revision 1.8
diff -u -r1.8 Parameters.java
--- Parameters.java 29 Jun 2002 02:15:02 -0000 1.8
+++ Parameters.java 3 Apr 2003 17:30:39 -0000
@@ -336,6 +336,26 @@
paramHashStringArray.put(key, values);
}
+ 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 void setURLDecoder( UDecoder u ) {
urlDec=u;
}





------------------------------------------------------------------------


Index: CoyoteRequest.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
retrieving revision 1.28
diff -u -r1.28 CoyoteRequest.java
--- CoyoteRequest.java  24 Nov 2002 11:56:15 -0000      1.28
+++ CoyoteRequest.java  3 Apr 2003 17:28:09 -0000
@@ -1262,7 +1262,7 @@
      * @param values Corresponding values for this request parameter
      */
     public void addParameter(String name, String values[]) {
-        // Not used
+        coyoteRequest.addParameter(name, values);
     }

I'll apply the patch. Thanks.


Remy


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to