commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpMethodBase.java
Date Thu, 19 Aug 2004 21:38:13 GMT
olegk       2004/08/19 14:38:13

  Modified:    httpclient/src/java/org/apache/commons/httpclient Tag:
                        HTTPCLIENT_2_0_BRANCH HttpMethodBase.java
  Log:
  Tone down warning messages generated by the readResponseBody method when encountering non-fatal
protocol violations
  
  Contributed by Oleg Kalnichevski
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.159.2.31 +9 -12     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.159.2.30
  retrieving revision 1.159.2.31
  diff -u -r1.159.2.30 -r1.159.2.31
  --- HttpMethodBase.java	27 Jul 2004 01:34:48 -0000	1.159.2.30
  +++ HttpMethodBase.java	19 Aug 2004 21:38:12 -0000	1.159.2.31
  @@ -2008,9 +2008,9 @@
       private InputStream readResponseBody(HttpConnection conn)
           throws IOException {
   
  -        LOG.trace("enter HttpMethodBase.readResponseBody(HttpState, HttpConnection)");
  +        LOG.trace("enter HttpMethodBase.readResponseBody(HttpConnection)");
   
  -        responseBody = null; // is this desired?
  +        responseBody = null;
           InputStream is = conn.getResponseInputStream();
           if (Wire.CONTENT_WIRE.enabled()) {
               is = new WireLogInputStream(is, Wire.CONTENT_WIRE);
  @@ -2044,10 +2044,7 @@
                       }
                   }
               } else {
  -                if (LOG.isWarnEnabled()) {
  -                    LOG.warn("Transfer-Encoding is set but does not contain \"chunked\":
"
  -                        + transferEncoding);
  -                }
  +                LOG.info("Response content is not chunk-encoded");
                   // The connection must be terminated by closing 
                   // the socket as per RFC 2616, 3.6
                   setConnectionCloseForced(true);
  @@ -2062,8 +2059,8 @@
                       if (connectionHeader != null) {
                           connectionDirective = connectionHeader.getValue();
                       }
  -                    if (!"close".equalsIgnoreCase(connectionDirective)) {
  -                        LOG.warn("Response content length is not known");
  +                    if (isHttp11() && !"close".equalsIgnoreCase(connectionDirective))
{
  +                        LOG.info("Response content length is not known");
                           setConnectionCloseForced(true);
                       }
                       result = is;            
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message