commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods PutMethod.java
Date Thu, 05 Sep 2002 04:25:01 GMT
dion        2002/09/04 21:25:01

  Modified:    httpclient/src/java/org/apache/commons/httpclient/methods
                        PutMethod.java
  Log:
  Updated patches from Ryan Lubke.
  Tests still don't pass on my machine due to JUnit 3.8 errors :(
  
  Revision  Changes    Path
  1.15      +8 -6      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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PutMethod.java	5 Sep 2002 04:07:46 -0000	1.14
  +++ PutMethod.java	5 Sep 2002 04:25:00 -0000	1.15
  @@ -247,9 +247,11 @@
       protected boolean writeRequestBody(HttpState state, HttpConnection conn)
       throws IOException, HttpException {
           log.trace("enter PutMethod.writeRequestBody(HttpState, HttpConnection)");
  -
  -        if(null != getRequestHeader("expect") && getStatusLine() != null &&
  -                getStatusLine().getStatusCode() != HttpStatus.SC_CONTINUE) {
  +         if (getStatusLine() == null) {
  +             return false;
  +         }
  +         if(null != getRequestHeader("expect") &&
  +                 getStatusLine().getStatusCode() != HttpStatus.SC_CONTINUE) {
               return false;
           }
           OutputStream out = conn.getRequestOutputStream((isHttp11() && (null ==
getRequestHeader("Content-Length"))));
  
  
  

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


Mime
View raw message