pnever 2003/07/16 07:28:27
Modified: src/webdav/server/org/apache/slide/webdav/method
UncheckoutMethod.java
Log:
Fixed bug in parseRequest() - thanks to Ingo Brunberg.
Revision Changes Path
1.11 +19 -17
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UncheckoutMethod.java
Index: UncheckoutMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/UncheckoutMethod.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- UncheckoutMethod.java 12 Aug 2002 12:55:02 -0000 1.10
+++ UncheckoutMethod.java 16 Jul 2003 14:28:15 -0000 1.11
@@ -106,7 +106,7 @@
/**
* Constructor.
- *
+ *
* @param token the token for accessing the namespace
* @param config configuration of the WebDAV servlet
*/
@@ -126,21 +126,23 @@
if (resourcePath == null) {
resourcePath = "/";
}
- try{
- parseRequestContent();
- }
- catch (JDOMException e){
- int statusCode = WebdavStatus.SC_BAD_REQUEST;
- sendError( statusCode, e );
- throw new WebdavException( statusCode );
- }
- catch (IOException e){
- int statusCode = WebdavStatus.SC_INTERNAL_SERVER_ERROR;
- sendError( statusCode, e );
- throw new WebdavException( statusCode );
+ if (req.getContentLength() > 0) {
+ try{
+ parseRequestContent();
+ }
+ catch (JDOMException e){
+ int statusCode = WebdavStatus.SC_BAD_REQUEST;
+ sendError( statusCode, e );
+ throw new WebdavException( statusCode );
+ }
+ catch (IOException e){
+ int statusCode = WebdavStatus.SC_INTERNAL_SERVER_ERROR;
+ sendError( statusCode, e );
+ throw new WebdavException( statusCode );
+ }
}
}
-
+
/**
* Execute the request.
*
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]