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 2002/04/05 07:43:14 UTC

cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method CheckoutMethod.java

juergen     02/04/04 21:43:14

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        CheckoutMethod.java
  Log:
  Set response status before throwing an exception in method parseRequest().
  Use appropriate status code for each exception.
  (ralf)
  
  Revision  Changes    Path
  1.3       +10 -7     jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CheckoutMethod.java
  
  Index: CheckoutMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CheckoutMethod.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CheckoutMethod.java	28 Mar 2002 06:12:12 -0000	1.2
  +++ CheckoutMethod.java	5 Apr 2002 05:43:14 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CheckoutMethod.java,v 1.2 2002/03/28 06:12:12 jericho Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/03/28 06:12:12 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CheckoutMethod.java,v 1.3 2002/04/05 05:43:14 juergen Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/04/05 05:43:14 $
    *
    * ====================================================================
    *
  @@ -128,14 +128,17 @@
           try{
               retrieveRequestContent();
           }
  -        catch (IOException  e){
  -            throw new WebdavException(WebdavStatus.SC_BAD_REQUEST);
  -        }
           catch (SAXException  e){
  +            resp.setStatus(WebdavStatus.SC_BAD_REQUEST);
               throw new WebdavException(WebdavStatus.SC_BAD_REQUEST);
           }
  +        catch (IOException  e){
  +            resp.setStatus(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
  +            throw new WebdavException(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
  +        }
           catch (ParserConfigurationException  e){
  -            throw new WebdavException(WebdavStatus.SC_BAD_REQUEST);
  +            resp.setStatus(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
  +            throw new WebdavException(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
           }
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>