craigmcc 01/06/01 13:21:41
Modified: src/share/org/apache/struts/util Tag: STRUTS_1_0_BRANCH
RequestUtils.java
Log:
Generate "&" instead of "&" in request URIs so that the output is still
legal XML syntax in the value returned by computeURL().
PR: Bugzilla #1938
Submitted by : Alessandro Vernet <[EMAIL PROTECTED]> (also supplied
the patch - thanks!)
Revision Changes Path
No revision
No revision
1.14.2.2 +7 -7
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
Index: RequestUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
retrieving revision 1.14.2.1
retrieving revision 1.14.2.2
diff -u -r1.14.2.1 -r1.14.2.2
--- RequestUtils.java 2001/06/01 18:45:03 1.14.2.1
+++ RequestUtils.java 2001/06/01 20:21:40 1.14.2.2
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.1
2001/06/01 18:45:03 craigmcc Exp $
- * $Revision: 1.14.2.1 $
- * $Date: 2001/06/01 18:45:03 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.2
2001/06/01 20:21:40 craigmcc Exp $
+ * $Revision: 1.14.2.2 $
+ * $Date: 2001/06/01 20:21:40 $
*
* ====================================================================
*
@@ -95,7 +95,7 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.14.2.1 $ $Date: 2001/06/01 18:45:03 $
+ * @version $Revision: 1.14.2.2 $ $Date: 2001/06/01 20:21:40 $
*/
public class RequestUtils {
@@ -364,7 +364,7 @@
url.append('?');
question = true;
} else
- url.append('&');
+ url.append("&");
url.append(URLEncoder.encode(key));
url.append('='); // Interpret null as "no value"
} else if (value instanceof String) {
@@ -372,7 +372,7 @@
url.append('?');
question = true;
} else
- url.append('&');
+ url.append("&");
url.append(URLEncoder.encode(key));
url.append('=');
url.append(URLEncoder.encode((String) value));
@@ -383,7 +383,7 @@
url.append('?');
question = true;
} else
- url.append('&');
+ url.append("&");
url.append(URLEncoder.encode(key));
url.append('=');
url.append(URLEncoder.encode(values[i]));