From: <jbo...@li...> - 2006-03-05 17:04:30
|
Author: mnasato Date: 2006-03-05 12:04:27 -0500 (Sun, 05 Mar 2006) New Revision: 2755 Modified: trunk/labs/davcache/src/net/sf/davcache/WebdavServlet.java Log: return 400 if XML response is invalid [#17] Modified: trunk/labs/davcache/src/net/sf/davcache/WebdavServlet.java =================================================================== --- trunk/labs/davcache/src/net/sf/davcache/WebdavServlet.java 2006-03-05 16:55:56 UTC (rev 2754) +++ trunk/labs/davcache/src/net/sf/davcache/WebdavServlet.java 2006-03-05 17:04:27 UTC (rev 2755) @@ -393,7 +393,8 @@ } catch (DocumentException e) { - throw new ServletException("error while parsing PROPFIND request", e); + response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Bad Request: invalid XML"); + return; } xmlResponse.addResource(absolutePath, store.isDirectory(relativePath), store.getProperties(relativePath)); if (depth == 1) @@ -439,7 +440,8 @@ } catch (DocumentException e) { - throw new ServletException("error while parsing PROPPATCH request", e); + response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Bad Request: invalid XML"); + return; } } |