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 oz...@apache.org on 2004/05/03 16:37:00 UTC
cvs commit: jakarta-slide/webdavclient/commandline/src/java/org/apache/webdav/cmd Slide.java
ozeigermann 2004/05/03 07:37:00
Modified: webdavclient/commandline/src/java/org/apache/webdav/cmd
Slide.java
Log:
Applied patch by Thomas Bernert to address issue in #28707
Revision Changes Path
1.4 +23 -6 jakarta-slide/webdavclient/commandline/src/java/org/apache/webdav/cmd/Slide.java
Index: Slide.java
===================================================================
RCS file: /home/cvs/jakarta-slide/webdavclient/commandline/src/java/org/apache/webdav/cmd/Slide.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Slide.java 1 Apr 2004 09:34:34 -0000 1.3
+++ Slide.java 3 May 2004 14:37:00 -0000 1.4
@@ -23,6 +23,11 @@
package org.apache.webdav.cmd;
+
+import org.apache.commons.httpclient.contrib.ssl.*;
+import org.apache.commons.httpclient.protocol.Protocol;
+
+
/**
* The Slide client, the command line version for WebDAV client.
*
@@ -40,6 +45,8 @@
public static void main(String[] args) {
Client client = new Client(System.in,System.out);
+
+ String remoteHost = null;
//////////// BEGIN Command line arguments //////////////
String argOptions = null;
@@ -52,8 +59,7 @@
else
argOptions = args[i];
} else {
-// slide.stringUrl = args[i];
- client.connect(args[i]);
+ remoteHost = args[i];
}
}
@@ -74,6 +80,12 @@
case 'd':
client.setDebug(Client.DEBUG_ON);
break;
+ case 's':
+ Protocol.registerProtocol("https",
+ new Protocol("https",
+ new EasySSLProtocolSocketFactory(),
+ 443));
+ break;
default:
System.exit(-1);
}
@@ -81,6 +93,10 @@
}
//////////// END Command line arguments //////////////
+ if (remoteHost != null) {
+ client.connect(remoteHost);
+ }
+
client.run();
}
@@ -90,7 +106,7 @@
private static void printCmdLineUsage()
{
- System.out.println("Usage: Slide [-vdh] " +
+ System.out.println("Usage: Slide [-vdhs] " +
"http://hostname[:port][/path]");
System.out.println
(" Default protocol: http, port: 80, path: /");
@@ -98,6 +114,7 @@
System.out.println(" -v: Print version information.");
System.out.println(" -d: Debug.");
System.out.println(" -h: Print this help message.");
+ System.out.println(" -s: use EasySSLProtocol");
System.out.println(
"Please, email bug reports to slide-user@jakarta.apache.org");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org