Bug 16642 - Check for 207 (Multistatus) breaks webdavResource.exists()
Summary: Check for 207 (Multistatus) breaks webdavResource.exists()
Status: NEEDINFO
Alias: None
Product: Slide
Classification: Unclassified
Component: WebDAV client (show other bugs)
Version: Nightly
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Slide Developer List
URL:
Keywords:
: 41750 (view as bug list)
Depends on:
Blocks: 31521
  Show dependency tree
 
Reported: 2003-01-31 14:50 UTC by Sylwester Lachiewicz
Modified: 2007-10-21 13:10 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sylwester Lachiewicz 2003-01-31 14:50:58 UTC
When I call WebdavResource with not found url (404 code) unknown exception is 
throw and it's not possible to call WebdavResource.exists()

Everything works fine without status check (changes done with last cvs update).
http://cvs.apache.org/viewcvs.cgi/jakarta-
slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java.diff?
r1=1.53&r2=1.54&diff_format=h

Index: WebdavResource.java
===================================================================
RCS file: /home/cvspublic/jakarta-slide/src/webdav/client/src/org/apache/webdav/
lib/WebdavResource.java,v
retrieving revision 1.54
diff -u -r1.54 WebdavResource.java
--- WebdavResource.java 16 Dec 2002 15:17:29 -0000      1.54
+++ WebdavResource.java 31 Jan 2003 14:45:49 -0000
@@ -2839,11 +2839,13 @@
         if (thisResource == true) {
             setStatusCode(status);
         }
+/*
         if (status != HttpStatus.SC_MULTI_STATUS) {
             HttpException ex = new HttpException();
             ex.setReasonCode(status);
             throw ex;
         }
+*/
         thisResource = false;

         return method.getResponses();
@@ -2906,13 +2908,16 @@
         // Set status code for this resource.
         if (thisResource == true) {
             // Set the status code.
-            setStatusCode(method.getStatusLine().getStatusCode());
+            setStatusCode(status);
         }
+/*
+        // why???
         if (status != HttpStatus.SC_MULTI_STATUS) {
             HttpException ex = new HttpException();
             ex.setReasonCode(status);
             throw ex;
         }
+*/
         thisResource = false;

         return method.getResponses();
Comment 1 Hannes Erven 2006-03-06 18:14:51 UTC
Is there any progress/workaround on/for this, or is this a WONTFIX ?
Comment 2 Martin van den Bemt 2007-03-29 15:10:15 UTC
Would be nice to have a test, so it's easier/simpler to reproduce
Comment 3 Antoine Levy-Lambert 2007-03-30 11:21:29 UTC
*** Bug 41750 has been marked as a duplicate of this bug. ***
Comment 4 Antoine Levy-Lambert 2007-03-30 11:22:53 UTC
Look at the comments in the bug report 41750 also for the resolution of this bug
Comment 5 Michael Laccetti 2007-10-21 13:10:40 UTC
Is there any way that this is going to make it into Slide at any point in time,
or would I be better off to just download the source and put the fix in directly?