You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2002/09/05 06:07:46 UTC

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods PutMethod.java

dion        2002/09/04 21:07:46

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpMethodBase.java
               httpclient/src/java/org/apache/commons/httpclient/methods
                        PutMethod.java
  Log:
  Patches from Ryan Lubke for documentation update and NPE in PutMethod tests
  
  Revision  Changes    Path
  1.58      +6 -6      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.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- HttpMethodBase.java	5 Sep 2002 03:37:55 -0000	1.57
  +++ HttpMethodBase.java	5 Sep 2002 04:07:46 -0000	1.58
  @@ -2040,8 +2040,8 @@
               if (!bodySent) {
                   bodySent = writeRequestBody(state, connection);
               } else {
  -                log.warn("Received status CONTINUE but he body has already been"
  -                    + "sent");
  +                log.warn("Received status CONTINUE but the body has already "
  +                    + "been sent");
                   // According to RFC 2616 this respose should be ignored
               }
               readResponse(state, connection);
  
  
  
  1.14      +5 -4      jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java
  
  Index: PutMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/PutMethod.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PutMethod.java	8 Aug 2002 21:51:36 -0000	1.13
  +++ PutMethod.java	5 Sep 2002 04:07:46 -0000	1.14
  @@ -248,7 +248,8 @@
       throws IOException, HttpException {
           log.trace("enter PutMethod.writeRequestBody(HttpState, HttpConnection)");
   
  -        if(null != getRequestHeader("expect") && getStatusCode() != HttpStatus.SC_CONTINUE) {
  +        if(null != getRequestHeader("expect") && getStatusLine() != null &&
  +                getStatusLine().getStatusCode() != HttpStatus.SC_CONTINUE) {
               return false;
           }
           OutputStream out = conn.getRequestOutputStream((isHttp11() && (null == getRequestHeader("Content-Length"))));
  
  
  

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