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:37 UTC

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

juergen     02/04/04 21:43:37

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        GetMethod.java
  Log:
  Set response status before throwing an exception in method parseRequest().
  Use appropriate status code for each exception.
  (ralf)
  
  Revision  Changes    Path
  1.23      +10 -7     jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/GetMethod.java
  
  Index: GetMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/GetMethod.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- GetMethod.java	28 Mar 2002 06:12:12 -0000	1.22
  +++ GetMethod.java	5 Apr 2002 05:43:37 -0000	1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/GetMethod.java,v 1.22 2002/03/28 06:12:12 jericho Exp $
  - * $Revision: 1.22 $
  - * $Date: 2002/03/28 06:12:12 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/GetMethod.java,v 1.23 2002/04/05 05:43:37 juergen Exp $
  + * $Revision: 1.23 $
  + * $Date: 2002/04/05 05:43:37 $
    *
    * ====================================================================
    *
  @@ -179,14 +179,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>