You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2004/08/10 18:02:21 UTC
cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method LockMethod.java OptionsMethod.java PutMethod.java
juergen 2004/08/10 09:02:21
Modified: src/webdav/server/org/apache/slide/webdav/method Tag:
SLIDE_2_0_RELEASE_BRANCH LockMethod.java
OptionsMethod.java PutMethod.java
Log:
Make lock, options and put chunking aware.
Revision Changes Path
No revision
No revision
1.55.2.4 +4 -4 jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LockMethod.java
Index: LockMethod.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/LockMethod.java,v
retrieving revision 1.55.2.3
retrieving revision 1.55.2.4
diff -u -r1.55.2.3 -r1.55.2.4
--- LockMethod.java 23 Mar 2004 13:32:08 -0000 1.55.2.3
+++ LockMethod.java 10 Aug 2004 16:02:20 -0000 1.55.2.4
@@ -183,7 +183,7 @@
lockDuration = requestHeaders.getTimeout(MAX_TIMEOUT);
- if (req.getContentLength() > 0) {
+ if (req.getContentLength() != 0) {
parseLockInfo();
}
else {
1.37.2.2 +4 -4 jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/OptionsMethod.java
Index: OptionsMethod.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/OptionsMethod.java,v
retrieving revision 1.37.2.1
retrieving revision 1.37.2.2
diff -u -r1.37.2.1 -r1.37.2.2
--- OptionsMethod.java 5 Feb 2004 16:11:23 -0000 1.37.2.1
+++ OptionsMethod.java 10 Aug 2004 16:02:20 -0000 1.37.2.2
@@ -83,7 +83,7 @@
protected void parseRequest() throws WebdavException {
- if( req.getContentLength() > 0 ) {
+ if( req.getContentLength() != 0 ) {
try {
Iterator i = parseRequestContent(E_OPTIONS).getChildren().iterator();
while( i.hasNext() ) {
1.69.2.5 +9 -4 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.69.2.4
retrieving revision 1.69.2.5
diff -u -r1.69.2.4 -r1.69.2.5
--- PutMethod.java 18 Jun 2004 16:07:10 -0000 1.69.2.4
+++ PutMethod.java 10 Aug 2004 16:02:20 -0000 1.69.2.5
@@ -211,10 +211,15 @@
NodeRevisionContent revisionContent =
new NodeRevisionContent();
//revisionContent.setContent(req.getReader());
+
revisionContent.setContent(req.getInputStream());
// Get content length
- revisionDescriptor.setContentLength(req.getContentLength());
+ int contentLength = req.getContentLength();
+ if (contentLength == (-1)) {
+ contentLength = revisionContent.getContentBytes().length;
+ }
+ revisionDescriptor.setContentLength(contentLength);
// Last modification date
revisionDescriptor.setLastModified(new Date());
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org