tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r761338 - /tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
Date Thu, 02 Apr 2009 16:22:14 GMT
Author: markt
Date: Thu Apr  2 16:22:13 2009
New Revision: 761338

URL: http://svn.apache.org/viewvc?rev=761338&view=rev
Log:
Fix litmus test failure:
MKCOL with weird body must fail with 415 (RFC2518:8.3.1)

Modified:
    tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=761338&r1=761337&r2=761338&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Thu Apr  2 16:22:13
2009
@@ -734,7 +734,7 @@
             return;
         }
 
-        if (req.getInputStream().available() > 0) {
+        if (req.getContentLength() > 0) {
             DocumentBuilder documentBuilder = getDocumentBuilder();
             try {
                 // Document document =
@@ -745,7 +745,7 @@
 
             } catch(SAXException saxe) {
                 // Parse error - assume invalid content
-                resp.sendError(WebdavStatus.SC_BAD_REQUEST);
+                resp.sendError(WebdavStatus.SC_UNSUPPORTED_MEDIA_TYPE);
                 return;
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message