ozeigermann    2005/01/26 05:35:55

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        PutMethod.java
  Log:
  Made at least computed length be a long
  
  Revision  Changes    Path
  1.90      +11 -9     
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PutMethod.java
  
  Index: PutMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PutMethod.java,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- PutMethod.java    13 Dec 2004 16:49:26 -0000      1.89
  +++ PutMethod.java    26 Jan 2005 13:35:55 -0000      1.90
  @@ -241,11 +241,12 @@
                       // we need to buffer the content to find out the content 
length
                       // and to save it for a retry
                       if (contentLength == -1 || retryUponConflict) {
  -                        contentLength = (int) 
revisionContent.bufferContent(revisionContent
  +                        long longContentLength = 
revisionContent.bufferContent(revisionContent
                                   .streamContent());
  -    //                    contentLength = 
revisionContent.getContentBytes().length;
  +                        
revisionDescriptor.setContentLength(longContentLength);
  +                    } else {
  +                        revisionDescriptor.setContentLength(contentLength);
                       }
  -                    revisionDescriptor.setContentLength(contentLength);
                   }
   
                   // Last modification date
  @@ -417,11 +418,12 @@
                       // we need to buffer the content to find out the content 
length
                       // and to save it for a retry
                       if (contentLength == -1 || retryUponConflict) {
  -                        contentLength = (int) 
revisionContent.bufferContent(revisionContent
  +                        long longContentLength = 
revisionContent.bufferContent(revisionContent
                                   .streamContent());
  -    //                    contentLength = 
revisionContent.getContentBytes().length;
  +                        
revisionDescriptor.setContentLength(longContentLength);
  +                    } else {
  +                        revisionDescriptor.setContentLength(contentLength);
                       }
  -                    revisionDescriptor.setContentLength(contentLength);
                   }
                   
                   content.create(slideToken, resourcePath, revisionDescriptor,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to