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 2001/03/28 07:56:52 UTC
cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/util HttpURL.java
jericho 01/03/27 21:56:52
Modified: src/webdav/client/src/org/apache/webdav/util HttpURL.java
Log:
- Replace string httpURL with httpURL.
- Untabify
- Fix constructor HttpURL(HttpURL, String)
If the http path indicate a directory or collection,
It's automatically followed the'/' sign.
Actually, It does some Web server to support WebDAV.
However, this HttpURL class is for generic URI, not WebDAV base.
And there is no way to distiguish that it's a collection or not.
So, in this constructor, It assume the first argument httpURL is a collection.
Revision Changes Path
1.7 +17 -15 jakarta-slide/src/webdav/client/src/org/apache/webdav/util/HttpURL.java
Index: HttpURL.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/HttpURL.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HttpURL.java 2001/03/26 11:08:29 1.6
+++ HttpURL.java 2001/03/28 05:56:52 1.7
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/HttpURL.java,v 1.6 2001/03/26 11:08:29 jericho Exp $
- * $Revision: 1.6 $
- * $Date: 2001/03/26 11:08:29 $
+ * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/util/HttpURL.java,v 1.7 2001/03/28 05:56:52 jericho Exp $
+ * $Revision: 1.7 $
+ * $Date: 2001/03/28 05:56:52 $
*
* ====================================================================
*
@@ -80,11 +80,11 @@
/**
* This Constructor
*
- * @param httpUrl the URI string.
+ * @param httpURL the URI string.
*/
- public HttpURL(String httpUrl) {
+ public HttpURL(String httpURL) {
- super(httpUrl);
+ super(httpURL);
setDefaultScheme(scheme);
setDefaultPort(port);
}
@@ -124,12 +124,14 @@
/**
* This Constructor
*
- * @param httpUrl The http URL.
+ * @param httpURL The http URL.
* @param path The added relative path.
*/
- public HttpURL(HttpURL httpUrl, String path) {
+ public HttpURL(HttpURL httpURL, String path) {
- this(httpUrl.toString() + path);
+ this(httpURL.toString().endsWith("/") ?
+ httpURL.toString() + path : httpURL.toString() + "/" + path);
+
}
@@ -195,10 +197,10 @@
public HttpURL getHttpURLExceptForPassword()
throws MalformedURLException {
- HttpURL httpUrl = getHttpURL();
- httpUrl.setUserInfo(httpUrl.getUserName(), null);
+ HttpURL httpURL = getHttpURL();
+ httpURL.setUserInfo(httpURL.getUserName(), null);
- return httpUrl;
+ return httpURL;
}
@@ -210,10 +212,10 @@
public HttpURL getHttpURLExceptForUserInfo()
throws MalformedURLException {
- HttpURL httpUrl = getHttpURL();
- httpUrl.setUserInfo(null, null);
+ HttpURL httpURL = getHttpURL();
+ httpURL.setUserInfo(null, null);
- return httpUrl;
+ return httpURL;
}