axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/transport/http HTTPSender.java
Date Wed, 12 Dec 2001 01:28:28 GMT
rubys       01/12/11 17:28:28

  Modified:    java/src/org/apache/axis/transport/http HTTPSender.java
  Log:
  Default basic authentication user and password from the specified URL
  
  Revision  Changes    Path
  1.43      +13 -0     xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java
  
  Index: HTTPSender.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- HTTPSender.java	2001/12/07 21:55:33	1.42
  +++ HTTPSender.java	2001/12/12 01:28:28	1.43
  @@ -292,6 +292,19 @@
               userID = msgContext.getStrProp( MessageContext.USERID );
               passwd = msgContext.getStrProp( MessageContext.PASSWORD );
   
  +            // if UserID is not part of the context, but is in the URL, use
  +            // the one in the URL.
  +            if ( userID == null && tmpURL.getUserInfo() != null) {
  +                String info = tmpURL.getUserInfo();
  +                int sep = info.indexOf(':');
  +                if ( (sep>=0) && (sep+1<info.length()) ) {
  +                    userID = info.substring(0,sep);
  +                    passwd = info.substring(sep+1);
  +                } else {
  +                    userID = info;
  +                }
  +            }
  +
               if ( userID != null ) {
                   StringBuffer tmpBuf = new StringBuffer();
                   tmpBuf.append( userID )
  
  
  

Mime
View raw message