You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by je...@apache.org on 2002/04/26 16:18:16 UTC
cvs commit: jakarta-slide/src/util/org/apache/util URIUtil.java
jericho 02/04/26 07:18:16
Modified: src/util/org/apache/util URIUtil.java
Log:
- It doesn't need to consider of MIME type encoding on a URI.
And the JDK package will be used for MIME type encoding.
- Patched by Bernd Eilers <Be...@Sun.COM>
Revision Changes Path
1.5 +5 -7 jakarta-slide/src/util/org/apache/util/URIUtil.java
Index: URIUtil.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/util/org/apache/util/URIUtil.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- URIUtil.java 25 Apr 2002 21:15:16 -0000 1.4
+++ URIUtil.java 26 Apr 2002 14:18:16 -0000 1.5
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/util/org/apache/util/URIUtil.java,v 1.4 2002/04/25 21:15:16 jericho Exp $
- * $Revision: 1.4 $
- * $Date: 2002/04/25 21:15:16 $
+ * $Header: /home/cvs/jakarta-slide/src/util/org/apache/util/URIUtil.java,v 1.5 2002/04/26 14:18:16 jericho Exp $
+ * $Revision: 1.5 $
+ * $Date: 2002/04/26 14:18:16 $
*
* ====================================================================
*
@@ -82,7 +82,7 @@
* @author Tim Tye
* @author Remy Maucherat
* @author Park, Sung-Gu
- * @version $Revision: 1.4 $ $Date: 2002/04/25 21:15:16 $
+ * @version $Revision: 1.5 $ $Date: 2002/04/26 14:18:16 $
* @see <a href=http://www.ietf.org/rfc/rfc2396.txt?number=2396>RFC 2396</a>
*/
@@ -340,9 +340,7 @@
int ox = 0;
while (ix < len) {
byte b = bytes[ix++]; // Get byte to test
- if (b == '+') {
- b = (byte) ' ';
- } else if (b == '%') {
+ if ((b == '%') && (ix+2 < len)) {
b = (byte) ((convertHexDigit(bytes[ix++]) << 4)
+ convertHexDigit(bytes[ix++]));
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>