remm 01/02/16 20:43:13
Modified: src/webdav/client/src/org/apache/webdav/lib/methods
CopyMethod.java MoveMethod.java
Log:
- Fix problems with generation of the Destination headers in COPY
and MOVE. For consistency with the rest of the API, all the parameters in the
API which designate URLs are relative URLs.
Bug reported by Patrick Gostovic <[EMAIL PROTECTED]>.
Revision Changes Path
1.6 +9 -4
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/CopyMethod.java
Index: CopyMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/CopyMethod.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CopyMethod.java 2001/02/16 02:54:01 1.5
+++ CopyMethod.java 2001/02/17 04:43:13 1.6
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/CopyMethod.java,v
1.5 2001/02/16 02:54:01 remm Exp $
- * $Revision: 1.5 $
- * $Date: 2001/02/16 02:54:01 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/CopyMethod.java,v
1.6 2001/02/17 04:43:13 remm Exp $
+ * $Revision: 1.6 $
+ * $Date: 2001/02/17 04:43:13 $
*
* ====================================================================
*
@@ -198,9 +198,14 @@
super.generateHeaders(host, state);
- setHeader("Destination", URLUtil.URLEncode(destination, "UTF8"));
+ String absoluteDestination = "http://" + host
+ + URLUtil.URLEncode(destination, "UTF8");
+
+ setHeader("Destination", absoluteDestination);
if (!isOverwrite())
setHeader("Overwrite", "F");
}
+
+
}
1.6 +7 -4
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/MoveMethod.java
Index: MoveMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/MoveMethod.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MoveMethod.java 2001/02/16 02:54:01 1.5
+++ MoveMethod.java 2001/02/17 04:43:13 1.6
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/MoveMethod.java,v
1.5 2001/02/16 02:54:01 remm Exp $
- * $Revision: 1.5 $
- * $Date: 2001/02/16 02:54:01 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/MoveMethod.java,v
1.6 2001/02/17 04:43:13 remm Exp $
+ * $Revision: 1.6 $
+ * $Date: 2001/02/17 04:43:13 $
*
* ====================================================================
*
@@ -200,7 +200,10 @@
super.generateHeaders(host, state);
- setHeader("Destination", URLUtil.URLEncode(destination, "UTF8"));
+ String absoluteDestination = "http://" + host
+ + URLUtil.URLEncode(destination, "UTF8");
+
+ setHeader("Destination", absoluteDestination);
if (!isOverwrite())
setHeader("Overwrite", "F");