jakarta-slide-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juer...@apache.org
Subject cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods XMLResponseMethodBase.java
Date Fri, 02 Aug 2002 13:11:25 GMT
juergen     2002/08/02 06:11:25

  Modified:    src/webdav/client/src/org/apache/webdav/lib/methods
                        XMLResponseMethodBase.java
  Log:
  403 and 409 may deliver a response body, this may be html. Supress the xml parsing exception.
Caution: the html body is now lost, was lost before anyway(?).
  
  Revision  Changes    Path
  1.30      +17 -7     jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/XMLResponseMethodBase.java
  
  Index: XMLResponseMethodBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/XMLResponseMethodBase.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- XMLResponseMethodBase.java	2 Aug 2002 12:14:51 -0000	1.29
  +++ XMLResponseMethodBase.java	2 Aug 2002 13:11:25 -0000	1.30
  @@ -220,10 +220,20 @@
        */
       public void parseResponse(InputStream input)
           throws IOException, HttpException {
  -        if (getStatusCode() == WebdavStatus.SC_MULTI_STATUS ||
  -            getStatusCode() == WebdavStatus.SC_CONFLICT     ||
  -            getStatusCode() == WebdavStatus.SC_FORBIDDEN ) {
  -            parseXMLResponse(input);
  +        try
  +        {
  +            if (getStatusCode() == WebdavStatus.SC_MULTI_STATUS ||
  +                getStatusCode() == WebdavStatus.SC_CONFLICT     ||
  +                getStatusCode() == WebdavStatus.SC_FORBIDDEN ) {
  +                parseXMLResponse(input);
  +            }
  +        }
  +        catch (IOException e) {
  +            if (getStatusCode() == WebdavStatus.SC_CONFLICT     ||
  +                getStatusCode() == WebdavStatus.SC_FORBIDDEN ) {
  +                // FIX ME:  provide a method to deliver non xml data
  +                responseDocument = null; // ignore the exception (body may be html)
  +            }
           }
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:slide-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:slide-dev-help@jakarta.apache.org>


Mime
View raw message