1) Be sure to specify the port for your HTTPS URL, even if it's the default, :443. It doesn't seem to work otherwise.
2) If you're using a self-signed cert, make sure you've added it to the list of certs trusted by your JVM. This forum post is a good reference on how to add your cert to the cacerts file:
http://forum.java.sun.com/thread.jsp?forum=63&thread=174214&message=548253
Here's my source:
Preferences prefs;
String userUri = prefs.getSlidePath() + "/files/" + request.getRemoteUser();
HttpURL url = new HttpsURL(prefs.getSlideUsername(), prefs.getSlidePassword(),
prefs.getSlideHost(), prefs.getSlidePort(), userUri, null);
// The URL should look something like: https://hostname:443/slide/files/user
// NOTE: I have found the :443 to be mandatory. SSL support doesn't seem to work without it.
System.out.println("URL: " + url);
WebdavResource resource = new WebdavResource(url);
boolean ret = resource.putMethod(URLEncoder.encode( userUri + "/" + file.getFileName()), file.getInputStream());
if(!ret)
{
log.error("PUT failed for file upload with status code: " + resource.getStatusCode() + " and message " + resource.getStatusMessage() );
}
Henry Lu wrote:
Could you send me a working-example of Get/Put with SSL ?
--------------------------------------------------------------------------- Henry Lu MSIS phone: (734) 615-6270 University of Michigan Medical School fax: (734) 936-3258
On Wed, 23 Jul 2003, K.C. Baltz wrote:
I have not been able to get SSL working in 1.0.16. The version in CVS does support SSL.
K.C.
Henry Lu wrote:
does Slide client suport SSL server?
--------------------------------------------------------------------------- Henry Lu MSIS phone: (734) 615-6270 University of Michigan Medical School fax: (734) 936-3258
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
