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 Sung-Gu <je...@apache.org> on 2002/03/12 08:59:21 UTC

Re: Problem with using HTTPS in org.apache.commons.httpclient.HttpCli ent

When you use WebdavResource library, 
you should have https parsing class inherited from one of generic uri.
It hasn't committed yet and I haven't look into them yet... sorry...

Sung-Gu

----- Original Message ----- 
From: "GARTRELL,MIKE (HP-Corvallis,ex1)" <mi...@hp.com>
To: "Slide-User (E-mail)" <sl...@jakarta.apache.org>
Cc: "Slide Developers Mailing List" <sl...@jakarta.apache.org>
Sent: Saturday, March 09, 2002 3:35 AM
Subject: Problem with using HTTPS in org.apache.commons.httpclient.HttpCli ent


> I'm unable to establish HTTPS connections using HttpClient.  I'm
> using the the following code to establish HTTPS connections using the
> org.apache.webdav.lib.WebdavResource class:
> 
> if (enableHttps) {
>             String escapedUrl = URIUtil.escape("https",
>                 URIUtil.schemeReserved()) + "://" + ((userName == null) ? ""
> :
>                 URIUtil.escape(userName) + ((password == null) ? "" : ":"
>                 + URIUtil.escape(password)) + "@") + URIUtil.escape(host,
>                 URIUtil.hostReserved()) + ((port == HttpURL.port || port ==
> -1)
>                 ? "" : ":" + port);
>             httpUrl = new HttpURL(escapedUrl);
>             }
>             else {
>                httpUrl = new HttpURL(userName, password, host, port);
>             }
>             currentWebdavResource = new WebdavResource(httpUrl);
> 
> Here's the stack trace I receive:
> java.io.IOException
>         at
> org.apache.commons.httpclient.HttpClient.openConnection(HttpClient.java:869)
>         at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:424)
>         at
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:2829
> )
>         at
> org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:2798
> )
>         at
> org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:693)
>         at
> org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:
> 680)
>         at
> org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1539)
>         at
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:987)
>         at
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1006)
>         at
> org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1085)
>         at
> org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:260)
>         at
> com.hp.vdpcore.webdav.DAVAccessControl.<init>(DAVAccessControl.java:86)
>         at
> com.hp.vdpcore.webdav.test.DAVAccessControlTest.setUp(DAVAccessControlTest.j
> ava:43)
>         at junit.framework.TestCase.runBare(TestCase.java:128)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:121)
>         at junit.framework.TestSuite.runTest(TestSuite.java:157)
>         at junit.framework.TestSuite.run(TestSuite.java:152)
>         at junit.textui.TestRunner.doRun(TestRunner.java:74)
>         at junit.textui.TestRunner.run(TestRunner.java:201)
>         at
> com.hp.vdpcore.webdav.test.DAVAccessControlTest.main(DAVAccessControlTest.ja
> va:57)
> 
> Any ideas about why this is failing?  Has anyone sucessfully tested
> the HTTPS support in HttpClient?  I'm using the current version of
> HttpClient checked into CVS (revision 1.9).
> 
> ---> Mike Gartrell <---     ---> mike_gartrell@hp.com <---
>                             ---> phone: (541) 715-0008 <---
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
>