mholz       2004/04/02 11:18:32

  Modified:    webdavclient/commandline/src/java/org/apache/webdav/cmd Tag:
                        SLIDE_2_0_RELEASE_BRANCH Client.java
  Log:
  Better error handling for the open command.
  Problem reported by  Michael H-Aᅵusler, see-b
  http://thread.gmane.org/gmane.comp.jakarta.slide.user/4001
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.5   +10 -5     
jakarta-slide/webdavclient/commandline/src/java/org/apache/webdav/cmd/Client.java
  
  Index: Client.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/webdavclient/commandline/src/java/org/apache/webdav/cmd/Client.java,v
  retrieving revision 1.2.2.4
  retrieving revision 1.2.2.5
  diff -u -r1.2.2.4 -r1.2.2.5
  --- Client.java       1 Apr 2004 07:00:13 -0000       1.2.2.4
  +++ Client.java       2 Apr 2004 19:18:32 -0000       1.2.2.5
  @@ -1924,7 +1924,12 @@
       }
   
       private static HttpURL uriToHttpURL(String uri) throws URIException {
  -        return uri.startsWith("https") ? new HttpsURL(uri.toCharArray())
  -                                       : new HttpURL(uri.toCharArray());
  +     if (uri.startsWith("http://";)) {
  +         return new HttpsURL(uri.toCharArray());
  +     }else if (uri.startsWith("https://";)) {
  +         return new HttpsURL(uri.toCharArray());
  +     } else {
  +         throw new URIException("Unknown protocol in URL " + uri);
  +     }
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to