You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2003/01/28 05:40:23 UTC

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestHeaderElement.java

jsdever     2003/01/27 20:40:23

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        Authenticator.java AutoCloseInputStream.java
                        ChunkedInputStream.java ChunkedOutputStream.java
                        ConnectMethod.java ContentLengthInputStream.java
                        Cookie.java Credentials.java Header.java
                        HeaderElement.java HostConfiguration.java
                        HttpClient.java HttpConnection.java
                        HttpConnectionManager.java HttpConstants.java
                        HttpException.java HttpMethod.java
                        HttpMethodBase.java HttpRecoverableException.java
                        HttpState.java HttpStatus.java HttpURL.java
                        HttpUrlMethod.java HttpsURL.java
                        MultiThreadedHttpConnectionManager.java
                        NTCredentials.java NTLM.java NameValuePair.java
                        RequestOutputStream.java
                        ResponseConsumedWatcher.java
                        ResponseInputStream.java
                        SimpleHttpConnectionManager.java StatusLine.java
                        URI.java URIException.java
                        UsernamePasswordCredentials.java
                        WireLogInputStream.java
               httpclient/src/java/org/apache/commons/httpclient/cookie
                        CookiePolicy.java CookieSpecBase.java
                        NetscapeDraftSpec.java RFC2109Spec.java
               httpclient/src/test/org/apache/commons/httpclient
                        TestHeaderElement.java
  Log:
  Another round of checkstyle alignments.
  
  Contributed by: Mike Bowler and Jeff Dever
  
  Revision  Changes    Path
  1.39      +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Authenticator.java
  
  Index: Authenticator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Authenticator.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Authenticator.java	27 Jan 2003 15:25:44 -0000	1.38
  +++ Authenticator.java	28 Jan 2003 04:40:20 -0000	1.39
  @@ -100,7 +100,7 @@
    * @author Ortwin Gl�ck
    * @author Sean C. Sullivan
    * @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a>
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * @version $Revision$ $Date$
    */
   public class Authenticator {
  
  
  
  1.7       +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/AutoCloseInputStream.java
  
  Index: AutoCloseInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/AutoCloseInputStream.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AutoCloseInputStream.java	27 Jan 2003 15:25:45 -0000	1.6
  +++ AutoCloseInputStream.java	28 Jan 2003 04:40:20 -0000	1.7
  @@ -73,7 +73,7 @@
    *
    * @author Ortwin Gl�ck
    * @author Eric Johnson
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    *
    * @since 2.0
    */
  
  
  
  1.12      +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ChunkedInputStream.java
  
  Index: ChunkedInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ChunkedInputStream.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ChunkedInputStream.java	27 Jan 2003 15:57:54 -0000	1.11
  +++ ChunkedInputStream.java	28 Jan 2003 04:40:20 -0000	1.12
  @@ -83,7 +83,7 @@
    * @author Sean C. Sullivan
    * @author Martin Elwin
    * @author Eric Johnson
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    *
    * @since 2.0
    *
  
  
  
  1.7       +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java
  
  Index: ChunkedOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ChunkedOutputStream.java	27 Jan 2003 15:57:54 -0000	1.6
  +++ ChunkedOutputStream.java	28 Jan 2003 04:40:20 -0000	1.7
  @@ -77,7 +77,7 @@
    * @author Sean C. Sullivan
    * @author <a href="mailto:dion@apache.org">dIon Gillard</a>
    * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * @version $Revision$ $Date$
    *
    * @see ChunkedInputStream
  
  
  
  1.7       +5 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectMethod.java
  
  Index: ConnectMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ConnectMethod.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ConnectMethod.java	27 Jan 2003 15:25:45 -0000	1.6
  +++ ConnectMethod.java	28 Jan 2003 04:40:20 -0000	1.7
  @@ -72,7 +72,7 @@
    *
    * @author Ortwin Gl�ck
    * @author dIon Gillard
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * @since 2.0
    * @version $Revision$ $Date$
    */
  
  
  
  1.6       +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ContentLengthInputStream.java
  
  Index: ContentLengthInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ContentLengthInputStream.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ContentLengthInputStream.java	27 Jan 2003 15:25:45 -0000	1.5
  +++ ContentLengthInputStream.java	28 Jan 2003 04:40:20 -0000	1.6
  @@ -72,7 +72,7 @@
    *
    * @author Ortwin Gl�ck
    * @author Eric Johnson
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * @since 2.0
    */
   
  
  
  
  1.35      +124 -74   jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Cookie.java
  
  Index: Cookie.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Cookie.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Cookie.java	27 Jan 2003 15:25:45 -0000	1.34
  +++ Cookie.java	28 Jan 2003 04:40:20 -0000	1.35
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -76,8 +77,8 @@
   
   /**
    * <p>An HTTP "magic-cookie", as specified in RFC 2109.</p>
  - *
  - * @author	B.C. Holmes
  + * 
  + * @author B.C. Holmes
    * @author <a href="mailto:jericho@thinkfree.com">Park, Sung-Gu</a>
    * @author <a href="mailto:dsale@us.britannica.com">Doug Sale</a>
    * @author Rod Waldhoff
  @@ -86,7 +87,8 @@
    * @author <a href="mailto:JEvans@Cyveillance.com">John Evans</a>
    * @author Marc A. Saegesser
    * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
  + * 
    * @version $Revision$ $Date$
    */
   
  @@ -112,7 +114,7 @@
        * @param domain  the host this cookie will be sent to
        */
       public Cookie(String domain, String name, String value) {
  -        this(domain,name,value,null,null,false);
  +        this(domain, name, value, null, null, false);
       }
   
       /**
  @@ -125,9 +127,12 @@
        * @param expires the {@link Date} at which this cookie expires,
        *                or <tt>null</tt> if the cookie expires at the end
        *                of the session
  -     * @param secure  if true this cookie will only be sent over secure connections
  +     * @param secure if true this cookie will only be sent over secure
  +     * connections
        */
  -    public Cookie(String domain, String name, String value, String path, Date expires, boolean secure) {
  +    public Cookie(String domain, String name, String value, 
  +        String path, Date expires, boolean secure) {
  +            
           super(name, value);
           LOG.trace("enter Cookie(String, String, String, String, Date, boolean)");
           if (name == null) {
  @@ -151,15 +156,19 @@
       /**
        * Create a cookie.
        *
  -     * @param name    the cookie name
  -     * @param value   the cookie value
  -     * @param domain  the host this cookie will be sent to
  -     * @param path    the path prefix for which this cookie will be sent
  -     * @param maxAge  the number of seconds for which this cookie is valid
  -     * @param secure  if <tt>true</tt> this cookie will only be sent over secure connections
  +     * @param name   the cookie name
  +     * @param value  the cookie value
  +     * @param domain the host this cookie will be sent to
  +     * @param path   the path prefix for which this cookie will be sent
  +     * @param maxAge the number of seconds for which this cookie is valid
  +     * @param secure if <tt>true</tt> this cookie will only be sent over secure
  +     * connections
        */
  -    public Cookie(String domain, String name, String value, String path, int maxAge, boolean secure) {
  -        this(domain,name,value,path,new Date(System.currentTimeMillis() + maxAge*1000L),secure);
  +    public Cookie(String domain, String name, String value, String path, 
  +        int maxAge, boolean secure) {
  +            
  +        this(domain, name, value, path, 
  +            new Date(System.currentTimeMillis() + maxAge * 1000L), secure);
       }
   
       /**
  @@ -338,21 +347,22 @@
       }
   
       /**
  -     * 
  +     * Return true if this cookie has expired.
        * @return <tt>true</tt> if I have expired.
        */
       public boolean isExpired() {
  -        return (_expiryDate != null  &&
  -            _expiryDate.getTime() <= System.currentTimeMillis());
  +        return (_expiryDate != null  
  +            && _expiryDate.getTime() <= System.currentTimeMillis());
       }
   
       /**
  -     * 
  +     * Return true if this cookie has expired according to the time passed in.
  +     * @param now The current time.
        * @return <tt>true</tt> if I have expired.
        */
       public boolean isExpired(Date now) {
  -        return (_expiryDate != null  &&
  -            _expiryDate.getTime() <= now.getTime());
  +        return (_expiryDate != null  
  +            && _expiryDate.getTime() <= now.getTime());
       }
   
   
  @@ -367,8 +377,7 @@
        * @see #isPathAttributeSpecified
        * @param value True if the cookie's path came from a Path attribute.
        */
  -    public void setPathAttributeSpecified(boolean value)
  -    {
  +    public void setPathAttributeSpecified(boolean value) {
           _hasPathAttribute = value;
       }
   
  @@ -379,8 +388,7 @@
        * @see #setPathAttributeSpecified
        * @return True if cookie's path was specified in the set-cookie header.
        */
  -    public boolean isPathAttributeSpecified()
  -    {
  +    public boolean isPathAttributeSpecified() {
           return _hasPathAttribute;
       }
   
  @@ -395,8 +403,7 @@
        * @see #isDomainAttributeSpecified
        * @param value True if the cookie's domain came from a Domain attribute.
        */
  -    public void setDomainAttributeSpecified(boolean value)
  -    {
  +    public void setDomainAttributeSpecified(boolean value) {
           _hasDomainAttribute = value;
       }
   
  @@ -407,32 +414,42 @@
        * @see #setDomainAttributeSpecified
        * @return True if cookie's domain was specified in the set-cookie header.
        */
  -    public boolean isDomainAttributeSpecified()
  -    {
  +    public boolean isDomainAttributeSpecified() {
           return _hasDomainAttribute;
       }
   
       /**
        * Returns a hash code in keeping with the
  -     * {@link Object#hashCode general hashCode contract}.
  +     * {@link Object#hashCode} general hashCode contract.
  +     * @return A hash code
        */
       public int hashCode() {
  -        return super.hashCode() ^
  -               (null == _path ? 0 : _path.hashCode()) ^
  -               (null == _domain ? 0 : _domain.hashCode());
  +        return super.hashCode()
  +            ^ (null == _path ? 0 : _path.hashCode())
  +            ^ (null == _domain ? 0 : _domain.hashCode());
       }
   
   
       /**
        * Two cookies are equal if the name, path and domain match.
  +     * @param obj The object to compare against.
  +     * @return true if the two objects are equal.
        */
       public boolean equals(Object obj) {
           LOG.trace("enter Cookie.equals(Object)");
  +        
           if ((obj != null) && (obj instanceof Cookie)) {
               Cookie that = (Cookie) obj;
  -            return (null == this.getName() ? null == that.getName() : this.getName().equals(that.getName())) &&
  -                   (null == this.getPath() ? null == that.getPath() : this.getPath().equals(that.getPath())) &&
  -                   (null == this.getDomain() ? null == that.getDomain() : this.getDomain().equals(that.getDomain()));
  +            return 
  +                (null == this.getName() 
  +                    ? null == that.getName() 
  +                    : this.getName().equals(that.getName())) 
  +                && (null == this.getPath() 
  +                    ? null == that.getPath() 
  +                    : this.getPath().equals(that.getPath())) 
  +                && (null == this.getDomain() 
  +                    ? null == that.getDomain() 
  +                    : this.getDomain().equals(that.getDomain()));
           } else {
               return false;
           }
  @@ -444,37 +461,44 @@
        * @return a string suitable for sending in a Cookie header.
        */
       public String toExternalForm() {
  -        return CookiePolicy.getSpecByVersion(getVersion()).formatCookie(this);
  +        return CookiePolicy.getSpecByVersion(
  +            getVersion()).formatCookie(this);
       }
   
       /**
  -     * Return <tt>true</tt> if I should be submitted with a request with
  -     * given attributes, <tt>false</tt> otherwise.
  +     * Return <tt>true</tt> if I should be submitted with a request with given
  +     * attributes, <tt>false</tt> otherwise.
        * @param domain the host to which the request is being submitted
  -     * @param port the port to which the request is being submitted (currenlty ignored)
  +     * @param port the port to which the request is being submitted (currently
  +     * ignored)
        * @param path the path to which the request is being submitted
        * @param secure <tt>true</tt> if the request is using the HTTPS protocol
        * @param date the time at which the request is submitted
  +     * @return true if the cookie matches
        * 
        * @deprecated use {@link CookieSpec} interface
        */
  -    public boolean matches(String domain, int port, String path, boolean secure, Date date)
  -    {
  +    public boolean matches(
  +        String domain, int port, String path, boolean secure, Date date) {
  +            
           LOG.trace("enter Cookie.matches(Strinng, int, String, boolean, Date");
           CookieSpec matcher = CookiePolicy.getDefaultSpec();
           return matcher.match(domain, port, path, secure, this);
       }
   
       /**
  -     * Return <tt>true</tt> if I should be submitted with a request with
  -     * given attributes, <tt>false</tt> otherwise.
  +     * Return <tt>true</tt> if I should be submitted with a request with given
  +     * attributes, <tt>false</tt> otherwise.
        * @param domain the host to which the request is being submitted
  -     * @param port the port to which the request is being submitted (currenlty ignored)
  +     * @param port the port to which the request is being submitted (currently
  +     * ignored)
        * @param path the path to which the request is being submitted
  -     * 
  +     * @param secure True if this cookie has the secure flag set
  +     * @return true if I should be submitted as above.
        * @deprecated use {@link CookieSpec} interface
        */
  -    public boolean matches(String domain, int port, String path, boolean secure) {
  +    public boolean matches(
  +        String domain, int port, String path, boolean secure) {
           LOG.trace("enter Cookie.matches(String, int, String, boolean");
           return matches(domain, port, path, secure, new Date());
       }
  @@ -488,11 +512,17 @@
        * <p>
        * If no cookies match, returns null.
        * 
  +     * @param domain The domain
  +     * @param path The path
  +     * @param cookies The cookies to use
  +     * @return The new header.
        * @deprecated use {@link CookieSpec} interface
        */
  -    public static Header createCookieHeader(String domain, String path, Cookie[] cookies) {
  -        LOG.trace("enter Cookie.createCookieHeader(String, String, Cookie[])");
  -        return Cookie.createCookieHeader(domain,path,false,cookies);
  +    public static Header createCookieHeader(String domain, String path, 
  +        Cookie[] cookies) {
  +            
  +        LOG.trace("enter Cookie.createCookieHeader(String,String,Cookie[])");
  +        return Cookie.createCookieHeader(domain, path, false, cookies);
       }
   
       /**
  @@ -502,30 +532,43 @@
        * <i>https</i> setting.
        * <p>
        * If no cookies match, returns null.
  -     * @exception java.lang.IllegalArgumentException if domain or path is null
  +     * 
  +     * @param domain The domain
  +     * @param path The path
  +     * @param secure True if this cookie has the secure flag set
  +     * @param cookies The cookies to use.
  +     * @return The new header
  +     * @exception IllegalArgumentException if domain or path is null
        * 
        * @deprecated use {@link CookieSpec} interface
        */
  -    public static Header createCookieHeader(String domain, String path, boolean secure, Cookie[] cookies)
  -    throws IllegalArgumentException {
  -	LOG.trace("enter Cookie.createCookieHeader(String, String, boolean, Cookie[])");
  -
  -        // Make sure domain isn't null here.  Path will be validated in subsequent call to createCookieHeader
  -        if(domain == null){
  -            throw new IllegalArgumentException("null domain in createCookieHeader.");
  +    public static Header createCookieHeader(String domain, String path, 
  +        boolean secure, Cookie[] cookies)
  +        throws IllegalArgumentException {
  +            
  +        LOG.trace("enter Cookie.createCookieHeader("
  +            + "String, String, boolean, Cookie[])");
  +
  +        // Make sure domain isn't null here.  Path will be validated in 
  +        // subsequent call to createCookieHeader
  +        if (domain == null) {
  +            throw new IllegalArgumentException("null domain in "
  +                + "createCookieHeader.");
           }
           // parse port from domain, if any
           int port = secure ? 443 : 80;
           int ndx = domain.indexOf(":");
           if (ndx != -1) {
               try {
  -                port = Integer.parseInt(domain.substring(ndx+1,domain.length()));
  -            } catch(NumberFormatException e){
  +                port = Integer.parseInt(domain.substring(ndx + 1, 
  +                    domain.length()));
  +            } catch (NumberFormatException e) {
                   // ignore?, but at least LOG
  -                LOG.warn("Cookie.createCookieHeader():  Invalid port number in domain " + domain);
  +                LOG.warn("Cookie.createCookieHeader():  "
  +                    + "Invalid port number in domain " + domain);
               }
           }
  -        return Cookie.createCookieHeader(domain,port,path,secure,cookies);
  +        return Cookie.createCookieHeader(domain, port, path, secure, cookies);
       }
   
       /**
  @@ -535,13 +578,21 @@
        * <i>path</i> and <i>https</i> setting.
        * <p>
        * If no cookies match, returns null.
  -     * @exception java.lang.IllegalArgumentException if domain or path is null
  +     * 
  +     * @param domain The domain
  +     * @param port The port
  +     * @param path The path
  +     * @param secure True if this cookie has the secure flag set
  +     * @param cookies The cookies to use.
  +     * @return The new header
  +     * @throws IllegalArgumentException if domain or path is null
        * 
        * @deprecated use {@link CookieSpec} interface
        */
  -    public static Header createCookieHeader(String domain, int port, String path, boolean secure, Cookie[] cookies) 
  -    throws IllegalArgumentException {
  -    LOG.trace("enter Cookie.createCookieHeader(String, int, String, boolean, Cookie[])");
  +    public static Header createCookieHeader(String domain, int port, 
  +        String path, boolean secure, Cookie[] cookies) 
  +        throws IllegalArgumentException {
  +        LOG.trace("enter Cookie.createCookieHeader(String, int, String, boolean, Cookie[])");
           return Cookie.createCookieHeader(domain, port, path, secure, new Date(), cookies);
       }
   
  @@ -560,7 +611,7 @@
        * @param now The date to check for expiry
        * @param cookies The cookies to use.
        * @return The new header
  -     * @exception IllegalArgumentException if domain or path is null
  +     * @throws IllegalArgumentException if domain or path is null
        * 
        * @deprecated use {@link CookieSpec} interface
        */
  @@ -575,8 +626,7 @@
           cookies = matcher.match(domain, port, path, secure, cookies);
           if ((cookies != null) && (cookies.length > 0)) {
               return matcher.formatCookieHeader(cookies);
  -        }
  -        else {
  +        } else {
               return null;
           } 
       }
  @@ -654,7 +704,7 @@
           throws HttpException, IllegalArgumentException {
               
           LOG.trace("enter Cookie.parse(String, int, String, Header)");
  -        return Cookie.parse(domain,port,path,false,setCookie);
  +        return Cookie.parse(domain, port, path, false, setCookie);
       }
   
       /**
  
  
  
  1.7       +10 -7     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Credentials.java
  
  Index: Credentials.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Credentials.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Credentials.java	23 Jan 2003 22:47:45 -0000	1.6
  +++ Credentials.java	28 Jan 2003 04:40:20 -0000	1.7
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -65,9 +66,11 @@
   /**
    * <p>Authentication credentials.</p>
    * <p>
  - *  This is just a marker interface, the
  - *  current implementation has no methods.
  + * This  is just a marker interface, the  current implementation has no methods.
    * </p>
  + * @author Unascribed
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
  + * 
    * @version $Revision$ $Date$
    */
   public interface Credentials {
  
  
  
  1.10      +12 -10    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Header.java
  
  Index: Header.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Header.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Header.java	23 Jan 2003 22:47:45 -0000	1.9
  +++ Header.java	28 Jan 2003 04:40:20 -0000	1.10
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -66,6 +67,7 @@
    * <p>An HTTP header.</p>
    *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * @version $Revision$ $Date$
    */
   public class Header extends NameValuePair {
  @@ -76,7 +78,7 @@
        * Default constructor.
        */
       public Header() {
  -        this(null,null);
  +        this(null, null);
       }
   
       /**
  @@ -98,10 +100,10 @@
        * @return string value for a HTTP HEAD
        */
       public String toExternalForm() {
  -        return ((null == getName() ? "" : getName()) +
  -                ": " +
  -                (null == getValue() ? "" : getValue()) +
  -                "\r\n");
  +        return ((null == getName() ? "" : getName()) 
  +            + ": " 
  +            + (null == getValue() ? "" : getValue()) 
  +            + "\r\n");
       }
   
       /**
  
  
  
  1.14      +60 -44    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HeaderElement.java
  
  Index: HeaderElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HeaderElement.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- HeaderElement.java	23 Jan 2003 22:47:45 -0000	1.13
  +++ HeaderElement.java	28 Jan 2003 04:40:20 -0000	1.14
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -112,6 +113,9 @@
    *
    * @author <a href="mailto:bcholmes@interlog.com">B.C. Holmes</a>
    * @author <a href="mailto:jericho@thinkfree.com">Park, Sung-Gu</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
  + * 
  + * @since 1.0
    * @version $Revision$ $Date$
    */
   public class HeaderElement extends NameValuePair {
  @@ -122,7 +126,7 @@
        * Default constructor.
        */
       public HeaderElement() {
  -        this(null,null,null);
  +        this(null, null, null);
       }
   
       /**
  @@ -131,7 +135,7 @@
         * @param value my (possibly <tt>null</tt>) value
         */
       public HeaderElement(String name, String value) {
  -        this(name,value,null);
  +        this(name, value, null);
       }
   
       /**
  @@ -144,13 +148,13 @@
       public HeaderElement(String name, String value,
               NameValuePair[] parameters) {
           super(name, value);
  -        this.parameters = parameters;
  +        setParameters(parameters);
       }
   
       // -------------------------------------------------------- Constants
   
       /** Log object for this class. */
  -    private static final Log log = LogFactory.getLog(HeaderElement.class);
  +    private static final Log LOG = LogFactory.getLog(HeaderElement.class);
   
       /**
        * Map of numeric values to whether or not the
  @@ -229,19 +233,27 @@
       // ----------------------------------------------------- Instance Variables
   
       /** My parameters, if any. */
  -    protected NameValuePair[] parameters = null;
  +    private NameValuePair[] _parameters = null;
   
       // ------------------------------------------------------------- Properties
   
       /**
        * Get parameters, if any.
        *
  +     * @since 2.0
        * @return parameters as an array of {@link NameValuePair}s
        */
       public NameValuePair[] getParameters() {
  -        return this.parameters;
  +        return this._parameters;
       }
   
  +    /**
  +     * 
  +     * @param pairs The new parameters.  May be null.
  +     */
  +    protected void setParameters(final NameValuePair[] pairs) {
  +        _parameters = pairs;
  +    }
       // --------------------------------------------------------- Public Methods
   
       /**
  @@ -253,9 +265,10 @@
        * @return the header elements containing <code>Header</code> elements.
        * @throws HttpException if the above syntax rules are violated.
        */
  -    public final static HeaderElement[] parse(String headerValue)
  -    throws HttpException {
  -        log.trace("enter HeaderElement.parse(String)");
  +    public static final HeaderElement[] parse(String headerValue)
  +        throws HttpException {
  +            
  +        LOG.trace("enter HeaderElement.parse(String)");
   
           if (headerValue == null) {
               return null;
  @@ -289,20 +302,20 @@
                    * For the general cases, rfc1123-date, rfc850-date.
                    */
                   if (tokenizer.hasMoreTokens()) {
  -                    if (nextToken.endsWith("Mon") ||
  -                        nextToken.endsWith("Tue") ||
  -                        nextToken.endsWith("Wed") ||
  -                        nextToken.endsWith("Thu") ||
  -                        nextToken.endsWith("Fri") ||
  -                        nextToken.endsWith("Sat") ||
  -                        nextToken.endsWith("Sun") ||
  -                        nextToken.endsWith("Monday") ||
  -                        nextToken.endsWith("Tuesday") ||
  -                        nextToken.endsWith("Wednesday") ||
  -                        nextToken.endsWith("Thursday") ||
  -                        nextToken.endsWith("Friday") ||
  -                        nextToken.endsWith("Saturday") ||
  -                        nextToken.endsWith("Sunday" )) {
  +                    if (nextToken.endsWith("Mon") 
  +                        || nextToken.endsWith("Tue")
  +                        || nextToken.endsWith("Wed") 
  +                        || nextToken.endsWith("Thu")
  +                        || nextToken.endsWith("Fri")
  +                        || nextToken.endsWith("Sat")
  +                        || nextToken.endsWith("Sun")
  +                        || nextToken.endsWith("Monday") 
  +                        || nextToken.endsWith("Tuesday") 
  +                        || nextToken.endsWith("Wednesday") 
  +                        || nextToken.endsWith("Thursday") 
  +                        || nextToken.endsWith("Friday") 
  +                        || nextToken.endsWith("Saturday") 
  +                        || nextToken.endsWith("Sunday")) {
   
                           nextToken += "," + tokenizer.nextToken();
                       }
  @@ -328,8 +341,8 @@
                       NameValuePair pair = parsePair(header, startPos, i);
                       if (pair == null) {
                           throw new HttpException(
  -                            "Bad header format: empty name/value pair in" +
  -                            nextToken);
  +                            "Bad header format: empty name/value pair in" 
  +                            + nextToken);
   
                       // the first name/value pair are handled differently
                       } else if (startPos == 0) {
  @@ -339,8 +352,8 @@
                           paramlist.addElement(pair);
                       }
                       startPos = i + 1;
  -                } else if (header[i] == '"' &&
  -                           !(inAString && i > 0 && header[i-1] == '\\')) {
  +                } else if (header[i] == '"' 
  +                    && !(inAString && i > 0 && header[i - 1] == '\\')) {
                       inAString = !inAString;
                   }
               }
  @@ -349,7 +362,7 @@
               if (paramlist.size() > 0) {
                   NameValuePair[] tmp2 = new NameValuePair[paramlist.size()];
                   paramlist.copyInto((NameValuePair[]) tmp2);
  -                element.parameters = tmp2;
  +                element.setParameters (tmp2);
                   paramlist.removeAllElements();
               }
   
  @@ -370,10 +383,10 @@
        * @return true if there are an odd number of quotation marks, false 
        *      otherwise
        */
  -    private final static boolean hasOddNumberOfQuotationMarks(String string) {
  +    private static final boolean hasOddNumberOfQuotationMarks(String string) {
           boolean odd = false;
           int start = -1;
  -        while ((start = string.indexOf('"', start+1)) != -1) {
  +        while ((start = string.indexOf('"', start + 1)) != -1) {
               odd = !odd;
           }
           return odd;
  @@ -387,10 +400,11 @@
        * @param end the end position of the text within the array
        * @return a {@link NameValuePair} representing the header
        */
  -    private final static NameValuePair parsePair(char[] header, int start, int end) {
  -        log.trace("enter HeaderElement.parsePair(char[], int, int)");
  +    private static final NameValuePair parsePair(char[] header, 
  +        int start, int end) {
  +            
  +        LOG.trace("enter HeaderElement.parsePair(char[], int, int)");
   
  -        boolean done = false;
           NameValuePair pair = null;
           String name = new String(header, start, end - start).trim();
           String value = null;
  @@ -399,13 +413,13 @@
           int index = name.indexOf("=");
           if (index >= 0) {
               if ((index + 1) < name.length()) {
  -                value = name.substring(index+1).trim();
  +                value = name.substring(index + 1).trim();
                   // strip quotation marks
                   if (value.startsWith("\"") && value.endsWith("\"")) {
  -                    value = value.substring(1,value.length()-1);
  +                    value = value.substring(1, value.length() - 1);
                   }
               }
  -            name = name.substring(0,index).trim();
  +            name = name.substring(0, index).trim();
           }
   
           pair = new NameValuePair(name, value);
  @@ -418,6 +432,7 @@
        * Returns parameter with the given name, if found. Otherwise null 
        * is returned
        *
  +     * @param name The name to search by.
        * @return NameValuePair parameter with the given name
        */
   
  @@ -426,9 +441,10 @@
               throw new NullPointerException("Name is null");
           } 
           NameValuePair found = null;
  -        if (this.parameters != null) {
  -            for(int i = 0; i < this.parameters.length; i ++) {
  -                NameValuePair current = this.parameters[ i ];
  +        NameValuePair parameters[] = getParameters();
  +        if (parameters != null) {
  +            for (int i = 0; i < parameters.length; i++) {
  +                NameValuePair current = parameters[ i ];
                   if (current.getName().equalsIgnoreCase(name)) {
                       found = current;
                       break;
  
  
  
  1.8       +82 -59    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HostConfiguration.java
  
  Index: HostConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HostConfiguration.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HostConfiguration.java	23 Jan 2003 22:47:46 -0000	1.7
  +++ HostConfiguration.java	28 Jan 2003 04:40:20 -0000	1.8
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -59,25 +60,38 @@
    * [Additional notices, if required by prior licensing conditions]
    *
    */
  +
   package org.apache.commons.httpclient;
   
   import org.apache.commons.httpclient.protocol.Protocol;
   
  -
   /**
    *
    * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * @since 2.0 
    */
  -public class HostConfiguration implements Cloneable{
  +public class HostConfiguration implements Cloneable {
   
  +    /** The host to use. */
       private String host;
  +
  +    /** The port to use. */
       private int port;
  +
  +    /** The protocol */
       private Protocol protocol;
  +
  +    /** True if a host has been set */
       private boolean hostSet;
  -    
  +
  +    /** The host name of the proxy server */
       private String proxyHost;
  +
  +    /** The port number of the proxy server */
       private int proxyPort;
  +
  +    /** True if a proxy server has been set */
       private boolean proxySet;
       
       /**
  @@ -101,11 +115,11 @@
        * 
        * @param hostConfiguration the hostConfiguration to copy
        */
  -    public HostConfiguration( HostConfiguration hostConfiguration ) {
  +    public HostConfiguration (HostConfiguration hostConfiguration) {
           
           // wrap all of the assignments in a synchronized block to avoid
           // having to negotiate the monitor for each method call
  -        synchronized( hostConfiguration ) {            
  +        synchronized (hostConfiguration) {            
               this.host = hostConfiguration.getHost();
               this.port = hostConfiguration.getPort();
               this.protocol = hostConfiguration.getProtocol();
  @@ -138,13 +152,10 @@
        */
       public synchronized boolean hostEquals(HttpConnection connection) {
           
  -        if ( hostSet ) {
  -            
  -            return ( 
  -                host.equalsIgnoreCase(connection.getHost())
  +        if (hostSet) {
  +            return (host.equalsIgnoreCase(connection.getHost())
                   && port == connection.getPort()
  -                && protocol.equals(connection.getProtocol())
  -            );
  +                && protocol.equals(connection.getProtocol()));
               
           } else {
               return false;   
  @@ -164,7 +175,7 @@
        */
       public synchronized boolean proxyEquals(HttpConnection connection) {
           
  -        if ( proxyHost == null ) {
  +        if (proxyHost == null) {
               return connection.getProxyHost() == null;   
           } else {
               return (
  @@ -175,16 +186,22 @@
           
       }    
       
  +    /**
  +     * Return true if the host is set.
  +     * @return boolean True if the host is set.
  +     */
       public synchronized boolean isHostSet() {
           return hostSet;
       }
   
  -    public synchronized void setHost(
  -        String host,
  -        int port,
  -        String protocol
  -    ) {
  -        setHost( host, port, Protocol.getProtocol(protocol) );
  +    /**
  +     *  Set the host
  +     * @param host The host.
  +     * @param port The port
  +     * @param protocol The protocol.
  +     */
  +    public synchronized void setHost(String host, int port, String protocol) {
  +        setHost(host, port, Protocol.getProtocol(protocol));
       }
       
       /**
  @@ -194,16 +211,14 @@
        * @param port the host port or -1 to use protocol default
        * @param protocol the protocol
        */
  -    public synchronized void setHost( 
  -        String host, 
  -        int port, 
  -        Protocol protocol 
  -    ) {
  -        if ( host == null ) {
  -            throw new IllegalArgumentException( "host must not be null" );   
  +    public synchronized void setHost(String host, int port, 
  +        Protocol protocol) {
  +            
  +        if (host == null) {
  +            throw new IllegalArgumentException("host must not be null");   
           }
  -        if ( protocol == null ) {
  -            throw new IllegalArgumentException( "protocol must not be null" );   
  +        if (protocol == null) {
  +            throw new IllegalArgumentException("protocol must not be null");   
           }
           
           this.host = host;
  @@ -221,22 +236,27 @@
       public synchronized void setHost(URI uri) {
           try {
               setHost(uri.getHost(), uri.getPort(), uri.getScheme());
  -        } catch(URIException e) {
  +        } catch (URIException e) {
               throw new IllegalArgumentException(e.toString());
           }
       }
   
  +    /**
  +     * Return the host url.
  +     * 
  +     * @return String The host url.
  +     */
       public synchronized String getHostURL() {
           
  -        if ( !hostSet ) {
  -            throw new IllegalStateException( 
  -                "a default host must be set to create a host URL" 
  +        if (!hostSet) {
  +            throw new IllegalStateException("a default host must be set to "
  +                + "create a host URL" 
               );   
           }
           
           String url = protocol.getScheme() + "://" + host;
           
  -        if ( port != -1 && port != protocol.getDefaultPort() ) {
  +        if (port != -1 && port != protocol.getDefaultPort()) {
               url += ":" + port;
           }
           
  @@ -262,23 +282,30 @@
   
       /**
        * Returns the protocol.
  -     * @return String
  +     * @return String The protocol.
        */
       public synchronized Protocol getProtocol() {
           return protocol;
       }
  -    
  +
  +    /**
  +     * @return boolean True if a proxy server has been set.
  +     */    
       public synchronized boolean isProxySet() {
           return proxySet;   
       }
   
  -    public synchronized void setProxy( String proxyHost, int proxyPort ) {
  +    /**
  +     * Set the proxy settings.
  +     * @param proxyHost The proxy host
  +     * @param proxyPort The proxy port
  +     */
  +    public synchronized void setProxy(String proxyHost, int proxyPort) {
           
           this.proxyHost = proxyHost;
           this.proxyPort = proxyPort;
           
           this.proxySet = true;
  -        
       }
   
       /**
  @@ -302,34 +329,32 @@
        */
       public synchronized boolean equals(Object o) {
           
  -        if ( o instanceof HostConfiguration ) {
  +        if (o instanceof HostConfiguration) {
               
               // shortcut if we're comparing with ourselves
  -            if ( o == this ) return true;
  +            if (o == this) { 
  +                return true;
  +            }
               
  -            HostConfiguration config = (HostConfiguration)o;
  +            HostConfiguration config = (HostConfiguration) o;
               
  -            if ( hostSet ) {
  -                if ( 
  -                    !host.equalsIgnoreCase( config.getHost() )
  +            if (hostSet) {
  +                if (!host.equalsIgnoreCase(config.getHost())
                       || port != config.getPort()
  -                    || !protocol.equals( config.getProtocol() )
  -                ) {
  +                    || !protocol.equals(config.getProtocol())) {
                       // either host, port or protocol don't match
                       return false;
                   }
  -            } else if ( config.isHostSet() ) {
  +            } else if (config.isHostSet()) {
                   return false;
               }
  -            if ( proxyHost != null ) {
  -                if ( 
  -                    !proxyHost.equalsIgnoreCase( config.getProxyHost() )
  -                    || proxyPort != config.getProxyPort()
  -                ) {
  +            if (proxyHost != null) {
  +                if (!proxyHost.equalsIgnoreCase (config.getProxyHost())
  +                    || proxyPort != config.getProxyPort()) {
                       // either proxyHost or proxyPort don't match
                       return false;
                   }
  -            } else if ( config.getProxyHost() != null ) {
  +            } else if (config.getProxyHost() != null) {
                   return false;
               }            
   
  @@ -347,14 +372,12 @@
        */
       public int hashCode() {
           
  -        if ( host != null ) {
  +        if (host != null) {
               return host.hashCode();
  -        } else if ( proxyHost != null ) {
  +        } else if (proxyHost != null) {
               return proxyHost.hashCode();   
           } else {
               return super.hashCode();
           }
  -        
       }
  -
   }
  
  
  
  1.68      +71 -64    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java
  
  Index: HttpClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- HttpClient.java	23 Jan 2003 22:47:46 -0000	1.67
  +++ HttpClient.java	28 Jan 2003 04:40:20 -0000	1.68
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -82,6 +83,7 @@
    * @author <a href="mailto:dion@apache.org">dIon Gillard</a>
    * @author Ortwin Gl�ck
    * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * 
    * @version $Revision$ $Date$
    */
  @@ -92,7 +94,7 @@
       // -------------------------------------------------------------- Constants
   
       /** Log object for this class. */
  -    private static final Log log = LogFactory.getLog(HttpClient.class);
  +    private static final Log LOG = LogFactory.getLog(HttpClient.class);
   
       // ----------------------------------------------------------- Constructors
   
  @@ -102,22 +104,23 @@
        * @see SimpleHttpConnectionManager
        */
       public HttpClient() {
  -        this( new SimpleHttpConnectionManager() );
  +        this(new SimpleHttpConnectionManager());
       }
   
       /**
        * Creates an HttpClient with a user specified connection manager.
  +     * @param httpConnectionManager The connection manager to use.
        * 
        * @since 2.0
        */
  -    public HttpClient( HttpConnectionManager httpConnectionManager ) {
  +    public HttpClient(HttpConnectionManager httpConnectionManager) {
   
  -        if ( httpConnectionManager == null ) {
  +        if (httpConnectionManager == null) {
               throw new IllegalArgumentException("httpConnectionManager cannot be null");  
           }
   
           this.state = new HttpState();
  -        this.state.setHttpConnectionManager( httpConnectionManager );
  +        this.state.setHttpConnectionManager(httpConnectionManager);
   
           this.hostConfiguration = new HostConfiguration();
   
  @@ -133,12 +136,16 @@
       /** the timout when waiting for a connection from the connectionManager */
       private long httpConnectionTimeout = 0;
   
  +    /** The timeout in milliseconds*/
       private int timeoutInMilliseconds = 0;
   
  +    /** The connection timeout. */
       private int connectionTimeout = 0;
   
  +    /** The host configuration to use */
       private HostConfiguration hostConfiguration;
       
  +    /** True if strict mode is enabled. */
       private boolean strictMode = false;
   
       // ------------------------------------------------------------- Properties
  @@ -205,7 +212,7 @@
        * 
        * @see HttpConnectionManager#getConnection(HostConfiguration, long)
        */
  -    public synchronized void setHttpConnectionFactoryTimeout( long timeout ) {
  +    public synchronized void setHttpConnectionFactoryTimeout(long timeout) {
           this.httpConnectionTimeout = timeout;
       }
   
  @@ -233,7 +240,7 @@
        * @see #getHostConfiguration()
        */
       public void startSession(String host, int port) {
  -        log.trace("enter HttpClient.startSession(String, int)");
  +        LOG.trace("enter HttpClient.startSession(String, int)");
           startSession(host, port, false);
       }
   
  @@ -249,18 +256,14 @@
        * @see #getHostConfiguration()
        */    
       public void startSession(String host, int port, boolean https) {
  -        log.trace("enter HttpClient.startSession(String, int, boolean)");
  +        LOG.trace("enter HttpClient.startSession(String, int, boolean)");
   
  -        if (log.isDebugEnabled()) {
  -            log.debug("HttpClient.startSession(String,int,boolean): Host:"
  +        if (LOG.isDebugEnabled()) {
  +            LOG.debug("HttpClient.startSession(String,int,boolean): Host:"
                   + host + " Port:" + port + " HTTPS:" + https);
           }
           
  -        this.hostConfiguration.setHost( 
  -            host, 
  -            port, 
  -            https ? "https" : "http"
  -        );
  +        this.hostConfiguration.setHost(host, port, https ? "https" : "http");
       }
   
       /**
  @@ -278,7 +281,7 @@
        * @see #startSession(String, int, Credentials, boolean)
        */
       public void startSession(String host, int port, Credentials creds) {
  -        log.trace("enter HttpClient.startSession(String, int, Credentials)");
  +        LOG.trace("enter HttpClient.startSession(String, int, Credentials)");
           startSession(host, port, creds, false);
       }
   
  @@ -295,12 +298,12 @@
        *
        * @see #getHostConfiguration()
        * @see #getState()
  -	 */
  +     */
       public void startSession(String host, int port, Credentials creds, boolean https) {
  -        log.trace("enter HttpClient.startSession(String, int, Credentials, boolean)");
  +        LOG.trace("enter HttpClient.startSession(String, int, Credentials, boolean)");
   
  -        if (log.isDebugEnabled()) {
  -            log.debug(
  +        if (LOG.isDebugEnabled()) {
  +            LOG.debug(
                   "Starting HttpClient session"
                   + " Host:" + host
                   + " Port:" + port + " Credentials:" + creds
  @@ -327,21 +330,24 @@
        * {@link URI URI} from which the scheme, userinfo, host and port of the
        * session are determined
        *
  -     * @exception IllegalStateException not enough information to process
  +     * @throws IllegalStateException not enough information to process
  +     * @throws URIException If the URI is bad.
        * 
        * @see #getHostConfiguration()
        * @see #getState()
        */
  -    public void startSession(URI uri) throws URIException {
  -        log.trace("enter HttpClient.startSession(URI)");
  +    public void startSession(URI uri) 
  +        throws URIException, IllegalStateException {
  +            
  +        LOG.trace("enter HttpClient.startSession(URI)");
   
           String scheme = uri.getScheme();
           if (scheme == null) {   // it may a URI instance or abs_path
  -            log.error("no scheme to start a session");
  +            LOG.error("no scheme to start a session");
               throw new IllegalStateException("no scheme to start a session");
           }
   
  -        Protocol protocol = Protocol.getProtocol( scheme );
  +        Protocol protocol = Protocol.getProtocol(scheme);
   
           String userinfo = uri.getUserinfo();
           if (userinfo != null) {
  @@ -350,16 +356,16 @@
           }
           String host = uri.getHost();
           if (host == null || host.length() == 0) {
  -            log.error("no host to start a session");
  +            LOG.error("no host to start a session");
               throw new IllegalStateException("no host to start a session");
           }
           int port = uri.getPort();
           if (port == -1) {   // neither HttpURL or HttpsURL instance
  -            log.error("HttpURL or HttpsURL instance required");
  +            LOG.error("HttpURL or HttpsURL instance required");
               throw new IllegalStateException
                   ("HttpURL or HttpsURL instance required");
           }
  -        this.hostConfiguration.setHost( host, port, protocol );
  +        this.hostConfiguration.setHost(host, port, protocol);
       }
   
       /**
  @@ -377,18 +383,13 @@
        *
        * @see #getHostConfiguration()
        */
  -    public void startSession(URL url) {
  -        log.trace("enter HttpClient.startSession(String, int, Credentials, boolean)");
  +    public void startSession(URL url) throws IllegalArgumentException {
  +        LOG.trace("enter HttpClient.startSession(String, int, Credentials, boolean)");
   
           int port = url.getPort();
  -        Protocol protocol = Protocol.getProtocol( url.getProtocol() );
  -
  -        hostConfiguration.setHost( 
  -            url.getHost(), 
  -            port,
  -            protocol
  -        );
  +        Protocol protocol = Protocol.getProtocol(url.getProtocol());
   
  +        hostConfiguration.setHost(url.getHost(), port, protocol);
       }
   
       /**
  @@ -409,8 +410,10 @@
        * @see #getHostConfiguration()   
        * @see #getState()
        */
  -    public void startSession(URL url, Credentials creds) {
  -        log.trace("enter HttpClient.startSession(URL, Credentials)");
  +    public void startSession(URL url, Credentials creds) 
  +        throws IllegalArgumentException {
  +            
  +        LOG.trace("enter HttpClient.startSession(URL, Credentials)");
           getState().setCredentials(null, creds);
           startSession(url);
       }
  @@ -429,7 +432,7 @@
        * @see #getHostConfiguration()
        */
       public void startSession(String host, int port, String proxyhost, int proxyport) {
  -        log.trace("enter HttpClient.startSession(String, int, String, int)");
  +        LOG.trace("enter HttpClient.startSession(String, int, String, int)");
           startSession(host, port, proxyhost, proxyport, false);
       }
   
  @@ -447,14 +450,13 @@
        * 
        * @see #getHostConfiguration()
        */
  -    public void startSession(String host, int port, String proxyhost, int proxyport, boolean secure) {
  -        log.trace("enter HttpClient.startSession(String, int, String, int, boolean)");
  -        this.hostConfiguration.setHost(
  -            host,
  -            port,
  -            secure ? "https" : "http"
  -        );
  -        this.hostConfiguration.setProxy( proxyhost, proxyport );
  +    public void startSession(String host, int port, 
  +        String proxyhost, int proxyport, boolean secure) {
  +            
  +        LOG.trace("enter HttpClient.startSession("
  +            + "String, int, String, int, boolean)");
  +        this.hostConfiguration.setHost (host, port, secure ? "https" : "http");
  +        this.hostConfiguration.setProxy(proxyhost, proxyport);
       }
   
       /**
  @@ -463,13 +465,13 @@
        * @param method the {@link HttpMethod} to execute.
        * @return the method's response code
        *
  -     * @throws java.io.IOException if an I/O error occurs
  +     * @throws IOException if an I/O error occurs
        * @throws HttpException if a protocol exception occurs
        */
       public int executeMethod(HttpMethod method)
           throws IOException, HttpException  {
               
  -        log.trace("enter HttpClient.executeMethod(HttpMethod)");
  +        LOG.trace("enter HttpClient.executeMethod(HttpMethod)");
           // execute this method and use its host configuration, if it has one
           return executeMethod(
               method.getHostConfiguration() != null 
  @@ -483,17 +485,19 @@
       /**
        * Executes the given method.
        *
  +     * @param hostConfiguration The configuration to use.
        * @param method the {@link HttpMethod} to execute.
        * @return the method's response code
        *
  -     * @throws java.io.IOException if an I/O error occurs
  +     * @throws IOException if an I/O error occurs
        * @throws HttpException if a protocol exception occurs
  -     * 
        * @since 2.0
        */
  -    public int executeMethod(HostConfiguration hostConfiguration, HttpMethod method)
  +    public int executeMethod(HostConfiguration hostConfiguration, 
  +        HttpMethod method)
           throws IOException, HttpException  {
  -        log.trace("enter HttpClient.executeMethod(HostConfiguration,HttpMethod)");
  +            
  +        LOG.trace("enter HttpClient.executeMethod(HostConfiguration,HttpMethod)");
   
           if (null == method) {
               throw new NullPointerException("HttpMethod parameter");
  @@ -510,7 +514,7 @@
            * from accessing data asynchronously as well having to regain the lock
            * for each item.
            */
  -        synchronized ( this ) {
  +        synchronized (this) {
               soTimeout = this.timeoutInMilliseconds;
               strictMode = this.strictMode;
               connectionTimeout = this.connectionTimeout;
  @@ -519,18 +523,21 @@
               defaultHostConfiguration = getHostConfiguration();
           }
   
  -        HostConfiguration methodConfiguration = new HostConfiguration(hostConfiguration);
  +        HostConfiguration methodConfiguration 
  +            = new HostConfiguration(hostConfiguration);
           
  -        if ( hostConfiguration != defaultHostConfiguration ) {
  +        if (hostConfiguration != defaultHostConfiguration) {
               // we may need to apply some defaults
  -            if ( !methodConfiguration.isHostSet() ) {
  +            if (!methodConfiguration.isHostSet()) {
                   methodConfiguration.setHost(
                       defaultHostConfiguration.getHost(),
                       defaultHostConfiguration.getPort(),
                       defaultHostConfiguration.getProtocol()
                   );
               }
  -            if ( !methodConfiguration.isProxySet() && defaultHostConfiguration.isProxySet() ) {
  +            if (!methodConfiguration.isProxySet() 
  +                && defaultHostConfiguration.isProxySet()) {
  +                    
                   methodConfiguration.setProxy(
                       defaultHostConfiguration.getProxyHost(),
                       defaultHostConfiguration.getProxyPort() 
  
  
  
  1.38      +262 -198  jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
  
  Index: HttpConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- HttpConnection.java	27 Jan 2003 15:25:45 -0000	1.37
  +++ HttpConnection.java	28 Jan 2003 04:40:20 -0000	1.38
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -77,8 +78,6 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  -
  -
   /**
    * An abstraction of an HTTP {@link InputStream} and {@link OutputStream}
    * pair, together with the relevant attributes.
  @@ -103,7 +102,9 @@
    * @author Sean C. Sullivan
    * @author Ortwin Gl�ck
    * @author Jeff Dever
  - * @version $Revision$ $Date$
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
  + * 
  + * @version   $Revision$ $Date$
    */
   public class HttpConnection {
       // ----------------------------------------------------------- Constructors
  @@ -153,7 +154,11 @@
        * @param host the host I should connect to
        * @param port the port I should connect to
        */
  -    public HttpConnection(String proxyHost, int proxyPort, String host, int port) {
  +    public HttpConnection(
  +        String proxyHost,
  +        int proxyPort,
  +        String host,
  +        int port) {
           this(proxyHost, proxyPort, host, port, false);
       }
   
  @@ -171,15 +176,18 @@
        * @see #HttpConnection(String, int, String, int, Protocol)
        *  
        */
  -    public HttpConnection(String proxyHost, int proxyPort, String host,
  -    int port, boolean secure) {
  -        this( 
  -            proxyHost, 
  -            proxyPort, 
  -            host, 
  -            port, 
  -            Protocol.getProtocol( secure ? "https" : "http" )
  -        );
  +    public HttpConnection(
  +        String proxyHost,
  +        int proxyPort,
  +        String host,
  +        int port,
  +        boolean secure) {
  +        this(
  +            proxyHost,
  +            proxyPort,
  +            host,
  +            port,
  +            Protocol.getProtocol(secure ? "https" : "http"));
       }
   
       /**
  @@ -187,45 +195,59 @@
        * 
        * @param hostConfiguration the host/proxy/protocol to use
        */
  -    public HttpConnection( HostConfiguration hostConfiguration ) {
  +    public HttpConnection(HostConfiguration hostConfiguration) {
           this(
               hostConfiguration.getProxyHost(),
               hostConfiguration.getProxyPort(),
               hostConfiguration.getHost(),
               hostConfiguration.getPort(),
  -            hostConfiguration.getProtocol()        
  -        );
  +            hostConfiguration.getProtocol());
       }
   
  +    /**
  +     * Create an instance
  +     * 
  +     * @param proxyHost the host I should proxy via
  +     * @param proxyPort the port I should proxy via
  +     * @param host the host I should connect to. Parameter value must be non-null.
  +     * @param port the port I should connect to
  +     * @param protocol The protocol to use.
  +     */
       public HttpConnection(
  -        String proxyHost, 
  -        int proxyPort, 
  +        String proxyHost,
  +        int proxyPort,
           String host,
  -        int port, 
  -        Protocol protocol
  -    ) {
  +        int port,
  +        Protocol protocol) {
   
  -        if( log.isDebugEnabled() ){
  -            log.debug(
  +        if (LOG.isDebugEnabled()) {
  +            LOG.debug(
                   "HttpConnectionManager.getConnection:  creating "
  -                + " connection for " + host + ":" + port + " via " + proxyHost
  -                + ":" + proxyPort + " using protocol: " + protocol
  -            );
  +                    + " connection for "
  +                    + host
  +                    + ":"
  +                    + port
  +                    + " via "
  +                    + proxyHost
  +                    + ":"
  +                    + proxyPort
  +                    + " using protocol: "
  +                    + protocol);
           }
  -        
  -        if ( host == null ) {
  +
  +        if (host == null) {
               throw new IllegalArgumentException("host parameter is null");
  -        }        
  -        if ( protocol == null ) {
  -            throw new IllegalArgumentException( "protocol is null" );
           }
  -        
  +        if (protocol == null) {
  +            throw new IllegalArgumentException("protocol is null");
  +        }
  +
           _proxyHost = proxyHost;
           _proxyPort = proxyPort;
           _host = host;
  -        _port = protocol.resolvePort( port );
  +        _port = protocol.resolvePort(port);
           _protocol = protocol;
  -        
  +
       }
   
       // ------------------------------------------ Attribute Setters and Getters
  @@ -296,8 +318,8 @@
        * @throws IllegalStateException if I am already connected
        */
       public void setProxyHost(String host) throws IllegalStateException {
  -       assertNotOpen();
  -       _proxyHost = host;
  +        assertNotOpen();
  +        _proxyHost = host;
       }
   
       /**
  @@ -316,8 +338,8 @@
        * @throws IllegalStateException if I am already connected
        */
       public void setProxyPort(int port) throws IllegalStateException {
  -       assertNotOpen();
  -       _proxyPort = port;
  +        assertNotOpen();
  +        _proxyPort = port;
       }
   
       /**
  @@ -351,27 +373,26 @@
        */
       public void setSecure(boolean secure) throws IllegalStateException {
           assertNotOpen();
  -        _protocol = (
  -            secure 
  -            ? Protocol.getProtocol( "https" ) 
  -            : Protocol.getProtocol( "http" )
  -        );
  +        _protocol =
  +            (secure
  +                ? Protocol.getProtocol("https")
  +                : Protocol.getProtocol("http"));
       }
   
       /**
        * Sets the protocol used by this connection.
        * 
  -     * @param protocol
  +     * @param protocol The new protocol.
        */
  -    public void setProtocol( Protocol protocol ) {
  +    public void setProtocol(Protocol protocol) {
           assertNotOpen();
  -        
  -        if ( protocol == null ) {
  -            throw new IllegalArgumentException( "protocol is null" );
  +
  +        if (protocol == null) {
  +            throw new IllegalArgumentException("protocol is null");
           }
  -        
  +
           _protocol = protocol;
  -        
  +
       }
   
       /**
  @@ -441,10 +462,10 @@
        * @throws IllegalStateException if I am not connected
        */
       public void setSoTimeout(int timeout)
  -    throws SocketException, IllegalStateException {
  -        log.debug("HttpConnection.setSoTimeout("+ timeout +")");
  -        _so_timeout = timeout;
  -        if(_socket != null){
  +        throws SocketException, IllegalStateException {
  +        LOG.debug("HttpConnection.setSoTimeout(" + timeout + ")");
  +        soTimeout = timeout;
  +        if (_socket != null) {
               _socket.setSoTimeout(timeout);
           }
       }
  @@ -456,7 +477,7 @@
        * @param timeout The timeout in milliseconds. 0 means timeout is not used.
        */
       public void setConnectionTimeout(int timeout) {
  -        this.connect_timeout = timeout;
  +        this.connectTimeout = timeout;
       }
   
       /**
  @@ -467,38 +488,40 @@
        * @throws IOException when there are errors opening the connection
        */
       public void open() throws IOException {
  -        log.trace("enter HttpConnection.open()");
  +        LOG.trace("enter HttpConnection.open()");
   
           assertNotOpen(); // ??? is this worth doing?
           try {
               if (null == _socket) {
  -                
  +
                   final String host = (null == _proxyHost) ? _host : _proxyHost;
                   final int port = (null == _proxyHost) ? _port : _proxyPort;
  -                
  -                _usingSecureSocket = isSecure() && !isProxied();                
  -                
  -                final ProtocolSocketFactory socketFactory = (
  -                    isSecure() && !isProxied()
  -                    ? _protocol.getSocketFactory()
  -                    : new DefaultProtocolSocketFactory()
  -                );
  -                
  -                if (connect_timeout == 0) {
  -                    _socket = socketFactory.createSocket(host,port);
  +
  +                _usingSecureSocket = isSecure() && !isProxied();
  +
  +                final ProtocolSocketFactory socketFactory =
  +                    (isSecure()
  +                        && !isProxied()
  +                            ? _protocol.getSocketFactory()
  +                            : new DefaultProtocolSocketFactory());
  +
  +                if (connectTimeout == 0) {
  +                    _socket = socketFactory.createSocket(host, port);
                   } else {
                       SocketTask task = new SocketTask() {
                           public void doit() throws IOException {
  -                            s = socketFactory.createSocket(host,port);
  +                            setSocket(socketFactory.createSocket(host, port));
                           }
                       };
  -                    TimeoutController.execute(task, connect_timeout);
  -                    _socket = task.s;
  -                    if (task.exception != null) throw task.exception;
  +                    TimeoutController.execute(task, connectTimeout);
  +                    _socket = task.getSocket();
  +                    if (task.exception != null) {
  +                        throw task.exception;
  +                    }
                   }
  -                
  +
               }
  -            
  +
               /*
               "Nagling has been broadly implemented across networks, 
               including the Internet, and is generally performed by default 
  @@ -506,9 +529,9 @@
               highly interactive environments, such as some client/server 
               situations. In such cases, nagling may be turned off through 
               use of the TCP_NODELAY sockets option." */
  -            
  -            _socket.setTcpNoDelay(_so_nodelay);
  -            _socket.setSoTimeout(_so_timeout);
  +
  +            _socket.setTcpNoDelay(soNodelay);
  +            _socket.setSoTimeout(soTimeout);
               _input = _socket.getInputStream();
               _output = _socket.getOutputStream();
               _open = true;
  @@ -518,49 +541,59 @@
               closeSocketAndStreams();
               throw e;
           } catch (TimeoutController.TimeoutException e) {
  -            if (log.isWarnEnabled()) {
  -                log.warn("The host "+ _host +":"+ _port +" (or proxy "+
  -                 _proxyHost +":"+ _proxyPort +") did not accept the connection "+
  -                 "within timeout of "+ connect_timeout +" milliseconds");
  +            if (LOG.isWarnEnabled()) {
  +                LOG.warn(
  +                    "The host "
  +                        + _host
  +                        + ":"
  +                        + _port
  +                        + " (or proxy "
  +                        + _proxyHost
  +                        + ":"
  +                        + _proxyPort
  +                        + ") did not accept the connection "
  +                        + "within timeout of "
  +                        + connectTimeout
  +                        + " milliseconds");
               }
               throw new ConnectionTimeoutException();
           }
       }
   
       /**
  -     * Calling this method indicates that the proxy has successfully created
  -     * the tunnel to the host. The socket will be switched to the secure socket.
  -     * Subsequent communication is done via the secure socket. The method can only
  -     * be called once on a proxied secure connection.
  +     * Calling this method indicates that the proxy has successfully created the
  +     * tunnel to the host. The socket will be switched to the secure socket.
  +     * Subsequent communication is done via the secure socket. The method can
  +     * only be called once on a proxied secure connection.
        *
        * @throws IllegalStateException if connection is not secure and proxied or
        * if the socket is already secure.
        * @throws IOException if an error occured creating the secure socket
        */
  -    public void tunnelCreated()
  -    throws IllegalStateException, IOException {
  -        log.trace("enter HttpConnection.tunnelCreated()");
  +    public void tunnelCreated() throws IllegalStateException, IOException {
  +        LOG.trace("enter HttpConnection.tunnelCreated()");
   
           if (!isSecure() || !isProxied()) {
  -            throw new IllegalStateException("Connection must be secure and proxied to use this feature");
  +            throw new IllegalStateException(
  +                "Connection must be secure "
  +                    + "and proxied to use this feature");
           }
  -        
  +
           if (_usingSecureSocket) {
               throw new IllegalStateException("Already using a secure socket");
           }
   
  -        SecureProtocolSocketFactory socketFactory = (SecureProtocolSocketFactory)
  -            _protocol.getSocketFactory();
  +        SecureProtocolSocketFactory socketFactory =
  +            (SecureProtocolSocketFactory) _protocol.getSocketFactory();
   
           _socket = socketFactory.createSocket(_socket, _host, _port, true);
           _input = _socket.getInputStream();
           _output = _socket.getOutputStream();
           _usingSecureSocket = true;
           _tunnelEstablished = true;
  -        log.debug("Secure tunnel created");
  +        LOG.debug("Secure tunnel created");
       }
   
  -
       /**
        * Indicates if the connection is completely transparent from end to end.
        *
  @@ -580,8 +613,8 @@
        * @return a stream to write the request to
        */
       public OutputStream getRequestOutputStream()
  -    throws IOException, IllegalStateException {
  -        log.trace("enter HttpConnection.getRequestOutputStream()");
  +        throws IOException, IllegalStateException {
  +        LOG.trace("enter HttpConnection.getRequestOutputStream()");
           assertOpen();
           return _output;
       }
  @@ -599,7 +632,7 @@
        */
       public OutputStream getRequestOutputStream(boolean useChunking)
           throws IOException, IllegalStateException {
  -        log.trace("enter HttpConnection.getRequestOutputStream(boolean)");
  +        LOG.trace("enter HttpConnection.getRequestOutputStream(boolean)");
   
           assertOpen();
           if (useChunking) {
  @@ -625,14 +658,20 @@
        * @deprecated Use getResponseInputStream() instead.
        */
       public InputStream getResponseInputStream(HttpMethod method)
  -    throws IOException, IllegalStateException {
  -        log.trace("enter HttpConnection.getResponseInputStream(HttpMethod)");
  +        throws IOException, IllegalStateException {
  +        LOG.trace("enter HttpConnection.getResponseInputStream(HttpMethod)");
           return getResponseInputStream();
       }
   
  +    /**
  +     * Return the response input stream
  +     * @return InputStream The response input stream.
  +     * @throws IOException If an IO problem occurs
  +     * @throws IllegalStateException If the connection isn't open.
  +     */
       public InputStream getResponseInputStream()
  -    throws IOException, IllegalStateException {
  -        log.trace("enter HttpConnection.getResponseInputStream()");
  +        throws IOException, IllegalStateException {
  +        LOG.trace("enter HttpConnection.getResponseInputStream()");
           assertOpen();
           return _input;
       }
  @@ -647,12 +686,11 @@
        * @see #write(byte[],int,int)
        */
       public void write(byte[] data)
  -    throws IOException, IllegalStateException, HttpRecoverableException {
  -        log.trace("enter HttpConnection.write(byte[])");
  +        throws IOException, IllegalStateException, HttpRecoverableException {
  +        LOG.trace("enter HttpConnection.write(byte[])");
           this.write(data, 0, data.length);
       }
   
  -
       /**
        * Write <i>length</i> bytes in <i>data</i> starting at
        * <i>offset</i> to my output stream.
  @@ -670,38 +708,42 @@
        * @throws IOException if an I/O problem occurs
        */
       public void write(byte[] data, int offset, int length)
  -    throws IOException, IllegalStateException, HttpRecoverableException {
  -        log.trace("enter HttpConnection.write(byte[], int, int)");
  +        throws IOException, IllegalStateException, HttpRecoverableException {
  +        LOG.trace("enter HttpConnection.write(byte[], int, int)");
   
  -        if (offset+length > data.length){
  -            throw new HttpRecoverableException("Unable to write:" +
  -                    " offset=" + offset +
  -                    " length=" + length +
  -                    " data.length=" + data.length);
  -        }else if (data.length <= 0){
  -            throw new HttpRecoverableException("Unable to write:" +
  -                    " data.length=" + data.length);
  +        if (offset + length > data.length) {
  +            throw new HttpRecoverableException(
  +                "Unable to write:"
  +                    + " offset="
  +                    + offset
  +                    + " length="
  +                    + length
  +                    + " data.length="
  +                    + data.length);
  +        } else if (data.length <= 0) {
  +            throw new HttpRecoverableException(
  +                "Unable to write:" + " data.length=" + data.length);
           }
   
           assertOpen();
   
  -        if(wireLog.isDebugEnabled()) {
  -            String data_str =  new String(data, offset, length, "ISO-8859-1");
  -            wireLog.debug(">> \"" + data_str + "\" [\\r\\n]" );
  +        if (WIRE_LOG.isDebugEnabled()) {
  +            String dataString = new String(data, offset, length, "ISO-8859-1");
  +            WIRE_LOG.debug(">> \"" + dataString + "\" [\\r\\n]");
           }
           try {
               _output.write(data, offset, length);
  -        } catch(SocketException se){
  -            log.debug("HttpConnection: Socket exception while writing data", se);
  +        } catch (SocketException se) {
  +            LOG.debug(
  +                "HttpConnection: Socket exception while writing data",
  +                se);
               throw new HttpRecoverableException(se.toString());
  -        } catch(IOException ioe) {
  -            log.debug("HttpConnection: Exception while writing data", ioe);
  +        } catch (IOException ioe) {
  +            LOG.debug("HttpConnection: Exception while writing data", ioe);
               throw ioe;
           }
       }
   
  -
  -
       /**
        * Write the specified bytes, followed by <tt>"\r\n".getBytes()</tt> to my
        * output stream.
  @@ -712,22 +754,22 @@
        * @throws IOException if an I/O problem occurs
        */
       public void writeLine(byte[] data)
  -    throws IOException, IllegalStateException, HttpRecoverableException {
  -        log.trace("enter HttpConnection.writeLine(byte[])");
  +        throws IOException, IllegalStateException, HttpRecoverableException {
  +        LOG.trace("enter HttpConnection.writeLine(byte[])");
   
           assertOpen();
  -        if(wireLog.isDebugEnabled() && (data.length > 0)) {
  -            String data_str =  HttpConstants.getContentString(data);
  -            wireLog.debug(">> \"" + data_str.trim() + "\" [\\r\\n]" );
  +        if (WIRE_LOG.isDebugEnabled() && (data.length > 0)) {
  +            String dataString = HttpConstants.getContentString(data);
  +            WIRE_LOG.debug(">> \"" + dataString.trim() + "\" [\\r\\n]");
           }
  -        try{
  +        try {
               _output.write(data);
               writeLine();
  -        } catch(SocketException se){
  -            log.info("SocketException while writing data to output", se);
  +        } catch (SocketException se) {
  +            LOG.info("SocketException while writing data to output", se);
               throw new HttpRecoverableException(se.toString());
  -        } catch(IOException ioe){
  -            log.info("IOException while writing data to output", ioe);
  +        } catch (IOException ioe) {
  +            LOG.info("IOException while writing data to output", ioe);
               throw ioe;
           }
       }
  @@ -741,22 +783,21 @@
        * @throws IOException if an I/O problem occurs
        */
       public void writeLine()
  -    throws IOException, IllegalStateException, HttpRecoverableException {
  -        log.trace("enter HttpConnection.writeLine()");
  +        throws IOException, IllegalStateException, HttpRecoverableException {
  +        LOG.trace("enter HttpConnection.writeLine()");
   
  -        wireLog.debug(">> [\\r\\n]");
  -        try{
  +        WIRE_LOG.debug(">> [\\r\\n]");
  +        try {
               _output.write(CRLF);
  -        } catch(SocketException se){
  -            log.warn("HttpConnection: Socket exception while writing data", se);
  +        } catch (SocketException se) {
  +            LOG.warn("HttpConnection: Socket exception while writing data", se);
               throw new HttpRecoverableException(se.toString());
  -        } catch(IOException ioe){
  -            log.warn("HttpConnection: IO exception while writing data", ioe);
  +        } catch (IOException ioe) {
  +            LOG.warn("HttpConnection: IO exception while writing data", ioe);
               throw ioe;
           }
       }
   
  -
       /**
        * Write the specified String (as bytes) to my output stream.
        *
  @@ -767,8 +808,8 @@
        * @throws IOException if an I/O problem occurs
        */
       public void print(String data)
  -    throws IOException, IllegalStateException, HttpRecoverableException {
  -        log.trace("enter HttpConnection.print(String)");
  +        throws IOException, IllegalStateException, HttpRecoverableException {
  +        LOG.trace("enter HttpConnection.print(String)");
           write(HttpConstants.getBytes(data));
       }
   
  @@ -783,8 +824,8 @@
        * @throws IOException if an I/O problem occurs
        */
       public void printLine(String data)
  -    throws IOException, IllegalStateException, HttpRecoverableException {
  -        log.trace("enter HttpConnection.printLine(String)");
  +        throws IOException, IllegalStateException, HttpRecoverableException {
  +        LOG.trace("enter HttpConnection.printLine(String)");
           writeLine(HttpConstants.getBytes(data));
       }
   
  @@ -797,8 +838,8 @@
        * @throws IOException if an I/O problem occurs
        */
       public void printLine()
  -    throws IOException, IllegalStateException, HttpRecoverableException {
  -        log.trace("enter HttpConnection.printLine()");
  +        throws IOException, IllegalStateException, HttpRecoverableException {
  +        LOG.trace("enter HttpConnection.printLine()");
           writeLine();
       }
   
  @@ -809,31 +850,30 @@
        * @throws IOException if an I/O problem occurs
        * @return a line from the response
        */
  -    public String readLine()
  -    throws IOException, IllegalStateException {
  -        log.trace("enter HttpConnection.readLine()");
  +    public String readLine() throws IOException, IllegalStateException {
  +        LOG.trace("enter HttpConnection.readLine()");
   
           assertOpen();
           StringBuffer buf = new StringBuffer();
  -        for(;;) {
  +        while (true) {
               int ch = _input.read();
  -            if(ch < 0) {
  -                if(buf.length() == 0) {
  +            if (ch < 0) {
  +                if (buf.length() == 0) {
                       return null;
                   } else {
                       break;
                   }
               } else if (ch == '\r') {
  -//                LOG.debug("HttpConnection.readLine() found \\r, continuing");
  +                //                LOG.debug("HttpConnection.readLine() found \\r, continuing");
                   continue;
               } else if (ch == '\n') {
  -//                LOG.debug("HttpConnection.readLine() found \\n, breaking");
  +                //                LOG.debug("HttpConnection.readLine() found \\n, breaking");
                   break;
               }
  -            buf.append((char)ch);
  +            buf.append((char) ch);
           }
  -        if(wireLog.isDebugEnabled() && buf.length() > 0) {
  -            wireLog.debug("<< \"" + buf.toString() + "\" [\\r\\n]");
  +        if (WIRE_LOG.isDebugEnabled() && buf.length() > 0) {
  +            WIRE_LOG.debug("<< \"" + buf.toString() + "\" [\\r\\n]");
           }
           return (buf.toString());
       }
  @@ -842,19 +882,19 @@
        * Shutdown my {@link Socket}'s output, via {@link Socket#shutdownOutput}.
        */
       public void shutdownOutput() {
  -        log.trace("enter HttpConnection.shutdownOutput()");
  +        LOG.trace("enter HttpConnection.shutdownOutput()");
   
           try {
               // Socket.shutdownOutput is a JDK 1.3
               // method. We'll use reflection in case
               // we're running in an older VM
               Class[] paramsClasses = new Class[0];
  -            Method shutdownOutput = _socket.getClass().getMethod
  -                ("shutdownOutput", paramsClasses);
  +            Method shutdownOutput =
  +                _socket.getClass().getMethod("shutdownOutput", paramsClasses);
               Object[] params = new Object[0];
               shutdownOutput.invoke(_socket, params);
           } catch (Exception ex) {
  -            log.debug("Unexpected Exception caught", ex);
  +            LOG.debug("Unexpected Exception caught", ex);
               // Ignore, and hope everything goes right
           }
           // close output stream?
  @@ -864,7 +904,7 @@
        * Close my socket and streams.
        */
       public void close() {
  -        log.trace("enter HttpConnection.close()");
  +        LOG.trace("enter HttpConnection.close()");
           closeSocketAndStreams();
       }
   
  @@ -883,22 +923,24 @@
       public void setHttpConnectionManager(HttpConnectionManager httpConnectionManager) {
           this.httpConnectionManager = httpConnectionManager;
       }
  -    
  +
  +    /**
  +     * Release the connection.
  +     */
       public void releaseConnection() {
  -        log.trace("enter HttpConnection.releaseConnection()");
  -        if ( httpConnectionManager != null ) {
  -            httpConnectionManager.releaseConnection( this );   
  -        }   
  +        LOG.trace("enter HttpConnection.releaseConnection()");
  +        if (httpConnectionManager != null) {
  +            httpConnectionManager.releaseConnection(this);
  +        }
       }
   
       // ------------------------------------------------------ Protected Methods
   
  -
       /**
        * Close everything out.
        */
       protected void closeSocketAndStreams() {
  -        log.trace("enter HttpConnection.closeSockedAndStreams()");
  +        LOG.trace("enter HttpConnection.closeSockedAndStreams()");
   
           // no longer care about previous responses...
           _lastResponseInput = null;
  @@ -906,8 +948,8 @@
           if (null != _input) {
               try {
                   _input.close();
  -            } catch(Exception ex) {
  -            log.debug("Exception caught when closing input", ex);
  +            } catch (Exception ex) {
  +                LOG.debug("Exception caught when closing input", ex);
                   // ignored
               }
               _input = null;
  @@ -916,8 +958,8 @@
           if (null != _output) {
               try {
                   _output.close();
  -            } catch(Exception ex) {
  -            log.debug("Exception caught when closing output", ex);
  +            } catch (Exception ex) {
  +                LOG.debug("Exception caught when closing output", ex);
                   // ignored
               }
               _output = null;
  @@ -926,8 +968,8 @@
           if (null != _socket) {
               try {
                   _socket.close();
  -            } catch(Exception ex) {
  -            log.debug("Exception caught when closing socket", ex);
  +            } catch (Exception ex) {
  +                LOG.debug("Exception caught when closing socket", ex);
                   // ignored
               }
               _socket = null;
  @@ -942,9 +984,8 @@
        *
        * @throws IllegalStateException if connected
        */
  -    protected void assertNotOpen()
  -    throws IllegalStateException {
  -        if(_open) {
  +    protected void assertNotOpen() throws IllegalStateException {
  +        if (_open) {
               throw new IllegalStateException("Connection is open");
           }
       }
  @@ -954,9 +995,8 @@
        *
        * @throws IllegalStateException if not connected
        */
  -    protected void assertOpen()
  -    throws IllegalStateException {
  -        if(!_open) {
  +    protected void assertOpen() throws IllegalStateException {
  +        if (!_open) {
               throw new IllegalStateException("Connection is not open");
           }
       }
  @@ -966,32 +1006,56 @@
        * Signals that a timeout occured while opening the socket.
        */
       public class ConnectionTimeoutException extends IOException {
  +        /** Create an instance */
           public ConnectionTimeoutException() {
           }
       }
   
  -    // -- Helper
  +    /**
  +     * Helper class for wrapping socket based tasks.
  +     */
       private abstract class SocketTask implements Runnable {
  -        public Socket s;
  -        public IOException exception;
  -
  +        /** The socket */
  +        private Socket socket;
  +        /** The exception */
  +        private IOException exception;
  +
  +        /**
  +         * Set the socket.
  +         * @param newSocket The new socket.
  +         */
  +        protected void setSocket(final Socket newSocket) {
  +            socket = newSocket;
  +        }
  +        /**
  +         * Return the socket.
  +         * @return Socket The socket.
  +         */
  +        protected Socket getSocket() {
  +            return socket;
  +        }
  +        /**
  +         * Perform the logic.
  +         * @throws IOException If an IO problem occurs
  +         */
           public abstract void doit() throws IOException;
   
  +        /** Execute the logic in this object and keep track of any exceptions. */
           public void run() {
               try {
                   doit();
  -            } catch(IOException e) {
  +            } catch (IOException e) {
                   exception = e;
               }
           }
       }
  -    
  +
       // ------------------------------------------------------------- Attributes
   
       /** Log object for this class. */
  -    private static final Log log = LogFactory.getLog(HttpConnection.class);
  +    private static final Log LOG = LogFactory.getLog(HttpConnection.class);
       /** Log for any wire messages. */
  -    private static final Log wireLog = LogFactory.getLog("httpclient.wire");
  +    private static final Log WIRE_LOG = LogFactory.getLog("httpclient.wire");
       /** My host. */
       private String _host = null;
       /** My port. */
  @@ -1015,15 +1079,15 @@
       /** <tt>"\r\n"</tt>, as bytes. */
       private static final byte[] CRLF = HttpConstants.getBytes("\r\n");
       /** SO_TIMEOUT socket value */
  -    private int _so_timeout = 0;
  +    private int soTimeout = 0;
       /** TCP_NODELAY socket value */
  -    private boolean _so_nodelay = true;
  +    private boolean soNodelay = true;
       /** Whether or not the _socket is a secure one. Note the difference to _ssl */
       private boolean _usingSecureSocket = false;
       /** Whether I am tunneling a proxy or not */
       private boolean _tunnelEstablished = false;
       /** Timeout until connection established (Socket created). 0 means no timeout. */
  -    private int connect_timeout = 0;
  +    private int connectTimeout = 0;
       /** the connection manager that created this connection or null */
       private HttpConnectionManager httpConnectionManager;
   }
  
  
  
  1.15      +13 -11    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnectionManager.java
  
  Index: HttpConnectionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnectionManager.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- HttpConnectionManager.java	23 Jan 2003 22:47:46 -0000	1.14
  +++ HttpConnectionManager.java	28 Jan 2003 04:40:20 -0000	1.15
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -62,12 +63,14 @@
   
   package org.apache.commons.httpclient;
   
  -
   /**
    * An interface for classes that manage HttpConnections.
    * 
    * @see org.apache.commons.httpclient.HttpConnection
    * @see org.apache.commons.httpclient.HttpClient#HttpClient(HttpConnectionManager)
  + *
  + * @author Unascribed
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * 
    * @since 2.0
    */
  @@ -87,7 +90,7 @@
        * 
        * @see HttpConnection#setHttpConnectionManager(HttpConnectionManager)
        */
  -    public HttpConnection getConnection(HostConfiguration hostConfiguration);
  +    HttpConnection getConnection(HostConfiguration hostConfiguration);
   
       /**
        * Gets an HttpConnection for a given host configuration. If a connection is
  @@ -104,12 +107,12 @@
        * 
        * @return an HttpConnection for the given configuraiton
        * 
  -     * @exception org.apache.commons.httpclient.HttpException if no connection
  -     * becomes available before the timeout expires
  +     * @throws HttpException if no connection becomes available before the
  +     * timeout expires
        * 
        * @see HttpConnection#setHttpConnectionManager(HttpConnectionManager)
        */
  -    public HttpConnection getConnection(HostConfiguration hostConfiguration, long timeout)
  +    HttpConnection getConnection(HostConfiguration hostConfiguration, long timeout)
           throws HttpException;
   
       /**
  @@ -117,6 +120,5 @@
        *
        * @param conn - The HttpConnection to make available.
        */
  -    public void releaseConnection(HttpConnection conn);
  -
  +    void releaseConnection(HttpConnection conn);
   }
  
  
  
  1.4       +57 -33    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConstants.java
  
  Index: HttpConstants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConstants.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HttpConstants.java	23 Jan 2003 22:47:46 -0000	1.3
  +++ HttpConstants.java	28 Jan 2003 04:40:20 -0000	1.4
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -59,8 +60,8 @@
    * [Additional notices, if required by prior licensing conditions]
    *
    */
  -package org.apache.commons.httpclient;
   
  +package org.apache.commons.httpclient;
   
   import java.io.UnsupportedEncodingException;
   
  @@ -72,6 +73,7 @@
    * DOCUMENT ME!
    *
    * @author Oleg Kalnichevski
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    */
   public class HttpConstants {
   
  @@ -82,16 +84,17 @@
       protected static final String DEFAULT_CONTENT_CHARSET = "ISO-8859-1";
   
       /** Log object for this class. */
  -    private static final Log log = LogFactory.getLog(HttpConstants.class);
  +    private static final Log LOG = LogFactory.getLog(HttpConstants.class);
   
       /**
        * Converts the specified string to a byte array of HTTP element characters.
  -     * This method is to be used when encoding content of HTTP elements (such as request headers)
  +     * This method is to be used when encoding content of HTTP elements (such as
  +     * request headers)
        *
        * @param data the string to be encoded
  +     * @return The resulting byte array.
        */
       public static byte[] getBytes(final String data) {
  -
           if (data == null) {
               throw new IllegalArgumentException("Parameter may not be null");
           }
  @@ -100,8 +103,10 @@
               return data.getBytes(HTTP_ELEMENT_CHARSET);
           } catch (UnsupportedEncodingException e) {
   
  -            if (log.isWarnEnabled()) {
  -                log.warn("Unsupported encoding: " + HTTP_ELEMENT_CHARSET + ". System default encoding used");
  +            if (LOG.isWarnEnabled()) {
  +                LOG.warn("Unsupported encoding: " 
  +                    + HTTP_ELEMENT_CHARSET 
  +                    + ". System default encoding used");
               }
   
               return data.getBytes();
  @@ -109,10 +114,12 @@
       }
   
       /**
  -     * Converts the byte array of HTTP element characters to a string
  -     * This method is to be used when decoding content of HTTP elements (such as response headers)
  +     * Converts the byte array of HTTP element characters to a string This
  +     * method is to be used when decoding content of HTTP elements (such as
  +     * response headers)
        *
        * @param data the byte array to be encoded
  +     * @return The resulting string.
        */
       public static String getString(final byte[] data) {
   
  @@ -124,8 +131,10 @@
               return new String(data, HTTP_ELEMENT_CHARSET);
           } catch (UnsupportedEncodingException e) {
   
  -            if (log.isWarnEnabled()) {
  -                log.warn("Unsupported encoding: " + HTTP_ELEMENT_CHARSET + ". System default encoding used");
  +            if (LOG.isWarnEnabled()) {
  +                LOG.warn("Unsupported encoding: " 
  +                    + HTTP_ELEMENT_CHARSET 
  +                    + ". System default encoding used");
               }
   
               return new String(data);
  @@ -140,6 +149,7 @@
        *
        * @param data the string to be encoded
        * @param charset the desired character encoding
  +     * @return The resulting byte array.
        */
       public static byte[] getContentBytes(final String data, String charset) {
   
  @@ -155,16 +165,20 @@
               return data.getBytes(charset);
           } catch (UnsupportedEncodingException e) {
   
  -            if (log.isWarnEnabled()) {
  -                log.warn("Unsupported encoding: " + charset + ". HTTP default encoding used");
  +            if (LOG.isWarnEnabled()) {
  +                LOG.warn("Unsupported encoding: " 
  +                    + charset 
  +                    + ". HTTP default encoding used");
               }
   
               try {
                   return data.getBytes(DEFAULT_CONTENT_CHARSET);
               } catch (UnsupportedEncodingException e2) {
   
  -                if (log.isWarnEnabled()) {
  -                    log.warn("Unsupported encoding: " + DEFAULT_CONTENT_CHARSET + ". System encoding used");
  +                if (LOG.isWarnEnabled()) {
  +                    LOG.warn("Unsupported encoding: " 
  +                        + DEFAULT_CONTENT_CHARSET 
  +                        + ". System encoding used");
                   }
   
                   return data.getBytes();
  @@ -173,13 +187,14 @@
       }
   
       /**
  -     * Converts the byte array of HTTP content characters to a string
  -     * This method is to be used when decoding content of HTTP request/response
  -     * If the specified charset is not supported, default HTTP content encoding
  +     * Converts the byte array of HTTP content characters to a string This
  +     * method is to be used when decoding content of HTTP request/response If
  +     * the specified charset is not supported, default HTTP content encoding
        * (ISO-8859-1) is applied
        *
        * @param data the byte array to be encoded
        * @param charset the desired character encoding
  +     * @return The result of the conversion.
        */
       public static String getContentString(final byte[] data, String charset) {
   
  @@ -195,16 +210,20 @@
               return new String(data, charset);
           } catch (UnsupportedEncodingException e) {
   
  -            if (log.isWarnEnabled()) {
  -                log.warn("Unsupported encoding: " + DEFAULT_CONTENT_CHARSET + ". Default HTTP encoding used");
  +            if (LOG.isWarnEnabled()) {
  +                LOG.warn("Unsupported encoding: " 
  +                    + DEFAULT_CONTENT_CHARSET 
  +                    + ". Default HTTP encoding used");
               }
   
               try {
                   return new String(data, DEFAULT_CONTENT_CHARSET);
               } catch (UnsupportedEncodingException e2) {
   
  -                if (log.isWarnEnabled()) {
  -                    log.warn("Unsupported encoding: " + DEFAULT_CONTENT_CHARSET + ". System encoding used");
  +                if (LOG.isWarnEnabled()) {
  +                    LOG.warn("Unsupported encoding: " 
  +                        + DEFAULT_CONTENT_CHARSET 
  +                        + ". System encoding used");
                   }
   
                   return new String(data);
  @@ -213,22 +232,24 @@
       }
   
       /**
  -     * Converts the specified string to a byte array of HTTP content charachetrs
  -     * using default HTTP content encoding (ISO-8859-1)
  -     * This method is to be used when encoding content of HTTP request/response
  +     * Converts the specified string to a byte array of HTTP content characters
  +     * using default HTTP content encoding (ISO-8859-1) This method is to be
  +     * used when encoding content of HTTP request/response
        *
        * @param data the string to be encoded
  +     * @return The byte array as above.
        */
       public static byte[] getContentBytes(final String data) {
           return getContentBytes(data, null);
       }
   
       /**
  -     * Converts the byte array of HTTP content characters to a string using default
  -     * HTTP content encoding (ISO-8859-1)
  -     * This method is to be used when decoding content of HTTP request/response
  +     * Converts the byte array of HTTP content characters to a string using
  +     * default HTTP content encoding (ISO-8859-1) This method is to be used when
  +     * decoding content of HTTP request/response
        *
        * @param data the byte array to be encoded
  +     * @return The string representation of the byte array.
        */
       public static String getContentString(final byte[] data) {
           return getContentString(data, null);
  @@ -238,6 +259,7 @@
        * Converts the specified string to byte array of ASCII characters.
        *
        * @param data the string to be encoded
  +     * @return The string as a byte array.
        */
       public static byte[] getAsciiBytes(final String data) {
   
  @@ -253,10 +275,12 @@
       }
   
       /**
  -     * Converts the byte array of ASCII characters to a string
  -     * This method is to be used when decoding content of HTTP elements (such as response headers)
  +     * Converts the byte array of ASCII characters to a string. This method is
  +     * to be used when decoding content of HTTP elements (such as response
  +     * headers)
        *
        * @param data the byte array to be encoded
  +     * @return The string representation of the byte array
        */
       public static String getAsciiString(final byte[] data) {
   
  
  
  
  1.13      +7 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpException.java
  
  Index: HttpException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpException.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HttpException.java	23 Jan 2003 22:47:46 -0000	1.12
  +++ HttpException.java	28 Jan 2003 04:40:20 -0000	1.13
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -81,6 +82,7 @@
    *  <li> 5xx: Server error
    * </ul>
    *
  + * @author Unascribed
    * @version $Revision$ $Date$
    */
   public class HttpException extends URIException {
  
  
  
  1.23      +86 -67    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethod.java
  
  Index: HttpMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethod.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- HttpMethod.java	23 Jan 2003 22:47:46 -0000	1.22
  +++ HttpMethod.java	28 Jan 2003 04:40:20 -0000	1.23
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -67,12 +68,13 @@
   
   /**
    * <p>
  - * A request to be applied to an {@link HttpConnection},
  - * and a container for the associated response.
  + * A request to be applied to an {@link HttpConnection}, and a container for the
  + * associated response.
    * </p>
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
    * @author Rod Waldhoff
    * @author <a href="jsdever@apache.org">Jeff Dever</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    *
    * @version $Revision$ $Date$
    * @since 1.0
  @@ -86,20 +88,20 @@
        * for example <tt>"GET"</tt> or <tt>"POST"</tt>.
        * @return the name of this method
        */
  -    public String getName();
  +    String getName();
   
       /**
        * Gets the host configuration for this method.
        * 
        * @return the HostConfiguration or <code>null</code> if none is set
        */
  -    public HostConfiguration getHostConfiguration();
  +    HostConfiguration getHostConfiguration();
   
       /**
        * Set the path part of my request.
        * @param path the path to request
        */
  -    public void setPath(String path);
  +    void setPath(String path);
   
       /**
        * Get the path part of my request.  
  @@ -111,7 +113,7 @@
        * case, HttpClient returns the 301 or 302 status code).
        * @return the path to request
        */
  -    public String getPath();
  +    String getPath();
   
       /**
        * Gets the URI for this method.  The URI will be absolute if the host
  @@ -121,18 +123,20 @@
        * 
        * @throws URIException if a URI cannot be constructed
        */
  -    public URI getURI() throws URIException;
  +    URI getURI() throws URIException;
   
       /**
  -     * Turns strict mode on or off.  In strict mode (the default)
  -     * we following the letter of RFC 2616, the Http 1.1 specification.
  -     * If strict mode is turned off we attempt to violate the specification
  -     * in the same way that most Http user agent's do (and many HTTP servers
  -     * expect.
  +     * <p>Turns strict mode on or off.  In strict mode (the default) we
  +     * following the letter of RFC 2616, the Http 1.1 specification. If strict
  +     * mode is turned off we attempt to violate the specification in the same
  +     * way that most Http user agent's do (and many HTTP servers expect.</p>
        *
  -     * NOTE:  StrictMode is currently experimental and its functionlaity may change in the future.
  +     * <p>NOTE:  StrictMode is currently experimental and its functionaity may
  +     * change in the future.</p>
  +     * 
  +     * @param strictMode True to enable strict mode.
        */
  -    public void setStrictMode(boolean strictMode);
  +    void setStrictMode(boolean strictMode);
   
       /**
        * Returns the value of strictMode.
  @@ -141,7 +145,7 @@
        *
        * @return true if strict mode is enabled.
        */
  -    public boolean isStrictMode();
  +    boolean isStrictMode();
        
       /**
        * Set the specified request header, overwriting any
  @@ -150,7 +154,7 @@
        * @param headerName the header's name
        * @param headerValue the header's value
        */
  -    public void setRequestHeader(String headerName, String headerValue);
  +    void setRequestHeader(String headerName, String headerValue);
   
       /**
        * Set the specified request header, overwriting any
  @@ -158,7 +162,7 @@
        * Note that header-name matching is case insensitive.
        * @param header the header
        */
  -    public void setRequestHeader(Header header);
  +    void setRequestHeader(Header header);
   
       /**
        * Adds the specified request header, NOT overwriting any
  @@ -167,7 +171,7 @@
        * @param headerName the header's name
        * @param headerValue the header's value
        */
  -    public void addRequestHeader(String headerName, String headerValue);
  +    void addRequestHeader(String headerName, String headerValue);
   
       /**
        * Adds the specified request header, NOT overwriting any
  @@ -175,7 +179,7 @@
        * Note that header-name matching is case insensitive.
        * @param header the header
        */
  -    public void addRequestHeader(Header header);
  +    void addRequestHeader(Header header);
   
       /**
        * Get the request header associated with the given name.
  @@ -183,118 +187,131 @@
        * @param headerName the header name
        * @return the header
        */
  -    public Header getRequestHeader(String headerName);
  +    Header getRequestHeader(String headerName);
   
       /**
        * Remove all request headers associated with the given name.
        * Note that header-name matching is case insensitive.
        * @param headerName the header name
        */
  -    public void removeRequestHeader(String headerName);
  +    void removeRequestHeader(String headerName);
   
       /**
        * Whether or not I should automatically follow
        * HTTP redirects (status code 302, etc.)
        * @return <tt>true</tt> if I will automatically follow HTTP redirects
        */
  -    public boolean getFollowRedirects();
  +    boolean getFollowRedirects();
   
       /**
  -     * Set whether or not I should automatically follow
  -     * HTTP redirects (status code 302, etc.)
  +     * Set whether or not I should automatically follow HTTP redirects (status
  +     * code 302, etc.)
  +     * @param followRedirects True if I should automatically follow redirects.
        */
  -    public void setFollowRedirects(boolean followRedirects);
  +    void setFollowRedirects(boolean followRedirects);
   
       /**
        * Set my query string.
        * @param queryString the query string
        */
  -    public void setQueryString(String queryString);
  +    void setQueryString(String queryString);
   
       /**
        * Set my query string.
        * @param params an array of {@link NameValuePair}s
        *               to add as query string parameterss
        */
  -    public void setQueryString(NameValuePair[] params);
  +    void setQueryString(NameValuePair[] params);
   
       /**
        * Get my query string.
        * @return my query string
        */
  -    public String getQueryString();
  +    String getQueryString();
   
       /**
        * Return an array of my request headers.
  +     * @return an array of request headers.
        */
  -    public Header[] getRequestHeaders();
  +    Header[] getRequestHeaders();
   
       // ---------------------------------------------------------------- Queries
   
       /**
        * Confirm that I am ready to execute.
  +     * @return True if I am ready to execute.
        */
  -    public boolean validate();
  +    boolean validate();
   
       /**
        * Return the status code associated with the latest response.
  +     * @return the status code.
        */
  -    public int getStatusCode();
  +    int getStatusCode();
   
       /**
  -     * Return the status text (or "reason phrase") associated with the latest response.
  +     * Return the status text (or "reason phrase") associated with the latest
  +     * response.
  +     * @return The status text.
        */
  -    public String getStatusText();
  +    String getStatusText();
   
       /**
        * Return an array of my response headers.
  +     * @return An array of all the response headers.
        */
  -    public Header[] getResponseHeaders();
  +    Header[] getResponseHeaders();
   
       /**
  -     * Return the specified response header.
  -     * Note that header-name matching is case insensitive.
  +     * Return the specified response header. Note that header-name matching is
  +     * case insensitive.
  +     * @param headerName The name of the header to be returned.
  +     * @return The specified response header.
        */
  -    public Header getResponseHeader(String headerName);
  +    Header getResponseHeader(String headerName);
   
       /**
        * Return an array of my response footers
        * @return <tt>null</tt> if no footers are available
        */
  -    public Header[] getResponseFooters();
  +    Header[] getResponseFooters();
   
       /**
  -     * Return the specified response footer.
  -     * Note that footer-name matching is case insensitive.
  +     * Return the specified response footer. Note that footer-name matching is
  +     * case insensitive.
  +     * @param footerName The name of the footer.
  +     * @return The response footer.
        */
  -    public Header getResponseFooter(String footerName);
  +    Header getResponseFooter(String footerName);
   
       /**
  -     * Return my response body, if any,
  -     * as a byte array.
  -     * Otherwise return <tt>null</tt>.
  +     * Return my response body, if any, as a byte array. Otherwise return
  +     * <tt>null</tt>.
  +     * @return The response body.
        */
  -    public byte[] getResponseBody();
  +    byte[] getResponseBody();
   
       /**
  -     * Return my response body, if any,
  -     * as a {@link String}.
  -     * Otherwise return <tt>null</tt>.
  +     * Return my response body, if any, as a {@link String}. Otherwise return
  +     * <tt>null</tt>.
  +     * @return response body.
        */
  -    public String getResponseBodyAsString();
  +    String getResponseBodyAsString();
   
       /**
  -     * Return my response body, if any,
  -     * as an {@link InputStream}.
  -     * Otherwise return <tt>null</tt>.
  +     * Return my response body, if any, as an {@link InputStream}. Otherwise
  +     * return <tt>null</tt>.
  +     * @return As above.
  +     * @throws IOException If an IO problem occurs.
        */
  -    public InputStream getResponseBodyAsStream() throws IOException;
  +    InputStream getResponseBodyAsStream() throws IOException;
   
       /**
        * Return <tt>true</tt> if I have been {@link #execute executed}
        * but not recycled.
  +     * @return true if this has been used.
        */
  -    public boolean hasBeenUsed();
  +    boolean hasBeenUsed();
   
       // --------------------------------------------------------- Action Methods
   
  @@ -309,34 +326,36 @@
        *
        * @return the integer status code if one was obtained, or <tt>-1</tt>
        */
  -    public int execute(HttpState state, HttpConnection connection) 
  -    throws HttpException, IOException;
  +    int execute(HttpState state, HttpConnection connection) 
  +        throws HttpException, IOException;
   
       /**
        * Recycle this method so that it can be used again.
        * Note that all of my instance variables will be reset
        * once this method has been called.
        */
  -    public void recycle();
  +    void recycle();
   
       /**
        * Releases the connection being used by this method.  In particular the
        * connection is used to read the response(if there is one) and will be held
        * until the response has been read.
        */
  -    public void releaseConnection();
  +    void releaseConnection();
   
       /**
        * Use this method internally to add footers.
  +     * @param footer The footer to add.
        * @since 2.0
        */
  -    public void addResponseFooter(Header footer);
  +    void addResponseFooter(Header footer);
   
       /** 
        * Return the Status-Line from the response.
  +     * @return The status line
        * @since 2.0
        */
  -    public StatusLine getStatusLine();
  +    StatusLine getStatusLine();
   
       /**
        * Whether or not I should automatically process responses where
  @@ -345,7 +364,7 @@
        * @return <tt>true</tt> if authentications will be processed automatically
        * @since 2.0
        */
  -    public boolean getDoAuthentication();
  +    boolean getDoAuthentication();
   
       /**
        * Set whether or not I should automatically process responses where
  @@ -354,6 +373,6 @@
        * @param doAuthentication <tt>true</tt> to process authentications
        * @since 2.0
        */
  -    public void setDoAuthentication(boolean doAuthentication);
  +    void setDoAuthentication(boolean doAuthentication);
         
   }
  
  
  
  1.102     +7 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
  
  Index: HttpMethodBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- HttpMethodBase.java	27 Jan 2003 15:25:45 -0000	1.101
  +++ HttpMethodBase.java	28 Jan 2003 04:40:21 -0000	1.102
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -59,6 +60,7 @@
    * [Additional notices, if required by prior licensing conditions]
    *
    */
  +
   package org.apache.commons.httpclient;
   
   import java.io.ByteArrayInputStream;
  
  
  
  1.6       +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpRecoverableException.java
  
  Index: HttpRecoverableException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpRecoverableException.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HttpRecoverableException.java	23 Jan 2003 22:47:47 -0000	1.5
  +++ HttpRecoverableException.java	28 Jan 2003 04:40:21 -0000	1.6
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.16      +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java
  
  Index: HttpState.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpState.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- HttpState.java	23 Jan 2003 22:47:47 -0000	1.15
  +++ HttpState.java	28 Jan 2003 04:40:21 -0000	1.16
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.11      +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpStatus.java
  
  Index: HttpStatus.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpStatus.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- HttpStatus.java	23 Jan 2003 22:47:47 -0000	1.10
  +++ HttpStatus.java	28 Jan 2003 04:40:21 -0000	1.11
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.8       +5 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpURL.java
  
  Index: HttpURL.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpURL.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HttpURL.java	23 Jan 2003 22:47:47 -0000	1.7
  +++ HttpURL.java	28 Jan 2003 04:40:21 -0000	1.8
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.9       +6 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpUrlMethod.java
  
  Index: HttpUrlMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpUrlMethod.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HttpUrlMethod.java	23 Jan 2003 22:47:48 -0000	1.8
  +++ HttpUrlMethod.java	28 Jan 2003 04:40:21 -0000	1.9
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -59,6 +60,7 @@
    * [Additional notices, if required by prior licensing conditions]
    *
    */
  +
   package org.apache.commons.httpclient;
   
   import java.net.MalformedURLException;
  
  
  
  1.4       +10 -9     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java
  
  Index: HttpsURL.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HttpsURL.java	23 Jan 2003 22:47:48 -0000	1.3
  +++ HttpsURL.java	28 Jan 2003 04:40:21 -0000	1.4
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -14,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -22,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -58,7 +59,7 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */ 
  + */
   
   package org.apache.commons.httpclient;
   
  
  
  
  1.7       +6 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
  
  Index: MultiThreadedHttpConnectionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MultiThreadedHttpConnectionManager.java	23 Jan 2003 22:47:48 -0000	1.6
  +++ MultiThreadedHttpConnectionManager.java	28 Jan 2003 04:40:21 -0000	1.7
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -59,6 +60,7 @@
    * [Additional notices, if required by prior licensing conditions]
    *
    */
  +
   package org.apache.commons.httpclient;
   
   import java.lang.ref.Reference;
  
  
  
  1.5       +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/NTCredentials.java
  
  Index: NTCredentials.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/NTCredentials.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NTCredentials.java	23 Jan 2003 22:47:48 -0000	1.4
  +++ NTCredentials.java	28 Jan 2003 04:40:21 -0000	1.5
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.10      +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/NTLM.java
  
  Index: NTLM.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/NTLM.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- NTLM.java	23 Jan 2003 22:47:48 -0000	1.9
  +++ NTLM.java	28 Jan 2003 04:40:21 -0000	1.10
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.12      +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/NameValuePair.java
  
  Index: NameValuePair.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/NameValuePair.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NameValuePair.java	23 Jan 2003 22:47:48 -0000	1.11
  +++ NameValuePair.java	28 Jan 2003 04:40:21 -0000	1.12
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.17      +6 -6      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/RequestOutputStream.java
  
  Index: RequestOutputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/RequestOutputStream.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- RequestOutputStream.java	23 Jan 2003 22:47:48 -0000	1.16
  +++ RequestOutputStream.java	28 Jan 2003 04:40:21 -0000	1.17
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -61,7 +62,6 @@
    */
   
   package org.apache.commons.httpclient;
  -
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  
  
  
  1.3       +5 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ResponseConsumedWatcher.java
  
  Index: ResponseConsumedWatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ResponseConsumedWatcher.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ResponseConsumedWatcher.java	23 Jan 2003 22:47:48 -0000	1.2
  +++ ResponseConsumedWatcher.java	28 Jan 2003 04:40:21 -0000	1.3
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.21      +7 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ResponseInputStream.java
  
  Index: ResponseInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/ResponseInputStream.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ResponseInputStream.java	23 Jan 2003 22:47:48 -0000	1.20
  +++ ResponseInputStream.java	28 Jan 2003 04:40:21 -0000	1.21
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -67,6 +68,7 @@
   
   import org.apache.commons.logging.LogFactory;
   import org.apache.commons.logging.Log;
  +
   /**
    * <p>{@link InputStream} wrapper supporting the chunked transfer encoding.</p>
    *
  
  
  
  1.8       +6 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/SimpleHttpConnectionManager.java
  
  Index: SimpleHttpConnectionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/SimpleHttpConnectionManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SimpleHttpConnectionManager.java	23 Jan 2003 22:47:48 -0000	1.7
  +++ SimpleHttpConnectionManager.java	28 Jan 2003 04:40:21 -0000	1.8
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  @@ -59,6 +60,7 @@
    * [Additional notices, if required by prior licensing conditions]
    *
    */
  +
   package org.apache.commons.httpclient;
   
   import java.io.IOException;
  
  
  
  1.7       +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/StatusLine.java
  
  Index: StatusLine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/StatusLine.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StatusLine.java	23 Jan 2003 22:47:48 -0000	1.6
  +++ StatusLine.java	28 Jan 2003 04:40:21 -0000	1.7
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.24      +11 -10    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java
  
  Index: URI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URI.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- URI.java	24 Jan 2003 13:45:49 -0000	1.23
  +++ URI.java	28 Jan 2003 04:40:21 -0000	1.24
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -14,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -22,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -58,7 +59,7 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */ 
  + */
   
   package org.apache.commons.httpclient;
   
  
  
  
  1.6       +11 -10    jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URIException.java
  
  Index: URIException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/URIException.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- URIException.java	23 Jan 2003 22:47:48 -0000	1.5
  +++ URIException.java	28 Jan 2003 04:40:21 -0000	1.6
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -14,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -22,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -58,7 +59,7 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */ 
  + */
   
   package org.apache.commons.httpclient;
   
  
  
  
  1.10      +6 -5      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/UsernamePasswordCredentials.java
  
  Index: UsernamePasswordCredentials.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/UsernamePasswordCredentials.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- UsernamePasswordCredentials.java	23 Jan 2003 22:47:48 -0000	1.9
  +++ UsernamePasswordCredentials.java	28 Jan 2003 04:40:21 -0000	1.10
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.7       +5 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/WireLogInputStream.java
  
  Index: WireLogInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/WireLogInputStream.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WireLogInputStream.java	27 Jan 2003 15:25:46 -0000	1.6
  +++ WireLogInputStream.java	28 Jan 2003 04:40:21 -0000	1.7
  @@ -2,6 +2,7 @@
    * $Header$
    * $Revision$
    * $Date$
  + *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
  @@ -28,7 +29,7 @@
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
  - * 4. The names "The Jakarta Project", "HttpClient", and "Apache Software
  + * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
    *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
  
  
  
  1.6       +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java
  
  Index: CookiePolicy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/CookiePolicy.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CookiePolicy.java	27 Jan 2003 15:25:47 -0000	1.5
  +++ CookiePolicy.java	28 Jan 2003 04:40:23 -0000	1.6
  @@ -83,7 +83,7 @@
    *  <tt>COMPATIBILITY</tt>, <tt>NETSCAPE_DRAFT</tt>, <tt>RFC2109</tt>.
    * 
    * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    *
    * @since 2.0
    */
  
  
  
  1.9       +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/CookieSpecBase.java
  
  Index: CookieSpecBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/CookieSpecBase.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CookieSpecBase.java	27 Jan 2003 15:25:47 -0000	1.8
  +++ CookieSpecBase.java	28 Jan 2003 04:40:23 -0000	1.9
  @@ -91,7 +91,7 @@
    * @author <a href="mailto:JEvans@Cyveillance.com">John Evans</a>
    * @author Marc A. Saegesser
    * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * 
    * @since 2.0 
    */
  
  
  
  1.7       +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/NetscapeDraftSpec.java
  
  Index: NetscapeDraftSpec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/NetscapeDraftSpec.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NetscapeDraftSpec.java	27 Jan 2003 15:25:47 -0000	1.6
  +++ NetscapeDraftSpec.java	28 Jan 2003 04:40:23 -0000	1.7
  @@ -84,7 +84,7 @@
    * @author <a href="mailto:JEvans@Cyveillance.com">John Evans</a>
    * @author Marc A. Saegesser
    * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * 
    * @since 2.0 
    */
  
  
  
  1.8       +4 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java
  
  Index: RFC2109Spec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RFC2109Spec.java	27 Jan 2003 15:57:55 -0000	1.7
  +++ RFC2109Spec.java	28 Jan 2003 04:40:23 -0000	1.8
  @@ -79,7 +79,7 @@
    * @author <a href="mailto:JEvans@Cyveillance.com">John Evans</a>
    * @author Marc A. Saegesser
    * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
  - * @author <a href="mailto:mbowler@GargoyleSoftware.com>Mike Bowler</a>
  + * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
    * 
    * @since 2.0 
    */
  
  
  
  1.5       +19 -19    jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHeaderElement.java
  
  Index: TestHeaderElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHeaderElement.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestHeaderElement.java	23 Jan 2003 22:48:26 -0000	1.4
  +++ TestHeaderElement.java	28 Jan 2003 04:40:23 -0000	1.5
  @@ -114,27 +114,27 @@
           // 1st element
           assertEquals("name1",elements[0].getName());
           assertEquals("value1",elements[0].getValue());
  -        // 1st element has 2 parameters
  -        assertEquals(2,elements[0].parameters.length);
  -        assertEquals("name2",elements[0].parameters[0].getName());
  -        assertTrue(null == elements[0].parameters[0].getValue());
  -        assertEquals("name3",elements[0].parameters[1].getName());
  -        assertEquals("value3",elements[0].parameters[1].getValue());
  +        // 1st element has 2 getParameters()
  +        assertEquals(2,elements[0].getParameters().length);
  +        assertEquals("name2",elements[0].getParameters()[0].getName());
  +        assertTrue(null == elements[0].getParameters()[0].getValue());
  +        assertEquals("name3",elements[0].getParameters()[1].getName());
  +        assertEquals("value3",elements[0].getParameters()[1].getValue());
           // 2nd element
           assertEquals("name4",elements[1].getName());
           assertEquals("value4",elements[1].getValue());
           // 2nd element has 1 parameter
  -        assertEquals(1,elements[1].parameters.length);
  -        assertEquals("name5",elements[1].parameters[0].getName());
  -        assertEquals("value5",elements[1].parameters[0].getValue());
  +        assertEquals(1,elements[1].getParameters().length);
  +        assertEquals("name5",elements[1].getParameters()[0].getName());
  +        assertEquals("value5",elements[1].getParameters()[0].getValue());
           // 3rd element
           assertEquals("name6",elements[2].getName());
           assertTrue(null == elements[2].getValue());
  -        // 3rd element has 2 parameters
  -        assertEquals(2,elements[2].parameters.length);
  -        assertEquals("name7",elements[2].parameters[0].getName());
  -        assertEquals("value7",elements[2].parameters[0].getValue());
  -        assertEquals("name8",elements[2].parameters[1].getName());
  -        assertEquals(" value8",elements[2].parameters[1].getValue());
  +        // 3rd element has 2 getParameters()
  +        assertEquals(2,elements[2].getParameters().length);
  +        assertEquals("name7",elements[2].getParameters()[0].getName());
  +        assertEquals("value7",elements[2].getParameters()[0].getValue());
  +        assertEquals("name8",elements[2].getParameters()[1].getName());
  +        assertEquals(" value8",elements[2].getParameters()[1].getValue());
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>