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 00:17:24 GMT
rubys       01/12/11 16:17:24

  Modified:    java/src/org/apache/axis/transport/http Tag: alpha-3
                        HTTPSender.java
  Log:
  Default basic authentication user and password from the specified URL
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.38.2.3  +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.38.2.2
  retrieving revision 1.38.2.3
  diff -u -r1.38.2.2 -r1.38.2.3
  --- HTTPSender.java	2001/12/07 18:17:23	1.38.2.2
  +++ HTTPSender.java	2001/12/12 00:17:24	1.38.2.3
  @@ -279,6 +279,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