]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* server/util_xml.c (ap_xml_parse_input): Give a 413 (Request Entity
authorJoe Orton <jorton@apache.org>
Thu, 15 Apr 2004 20:10:38 +0000 (20:10 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 15 Apr 2004 20:10:38 +0000 (20:10 +0000)
Too Large) not a 400 if the client exceeds the configured XML request
body limit.

Reviewed by: Jeff Trawick, Brad Nicholes

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103398 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/util_xml.c

diff --git a/STATUS b/STATUS
index 284c3d7ad679da373d02d0d4a64ab3de8236011f..055435c7856167979d85c2f9ea64310abd981f3d 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2004/04/15 19:54:49 $]
+Last modified at [$Date: 2004/04/15 20:10:37 $]
 
 Release:
 
@@ -175,10 +175,6 @@ PATCHES TO BACKPORT FROM 2.1
        http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/dav/main/util.c?r1=1.53&r2=1.54
        +1: jorton, nd
 
-    *) Issue a 413 not a 400 if client exceeds configured LimitXMLRequestBody
-       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/util_xml.c?r1=1.28&r2=1.29
-       +1: jorton, trawick, bnicholes
-
     *) mod_dav: Send an EOS at the end of the multistatus brigade.
        http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/dav/main/mod_dav.c?r1=1.105&r2=1.106
        +1: jorton
index 7fb1993e2492a7b3aba06a7f6f00a87db1edbff4..24c7ea0e9e2877bfc96c3c8c03736a378c503dda 100644 (file)
@@ -36,6 +36,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
     char errbuf[200];
     apr_size_t total_read = 0;
     apr_size_t limit_xml_body = ap_get_limit_xml_body(r);
+    int result = HTTP_BAD_REQUEST;
 
     parser = apr_xml_parser_create(r->pool);
     brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
@@ -78,6 +79,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                               "XML request body is larger than the configured "
                               "limit of %lu", (unsigned long)limit_xml_body);
+                result = HTTP_REQUEST_ENTITY_TOO_LARGE;
                 goto read_error;
             }
 
@@ -121,5 +123,5 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
     apr_brigade_destroy(brigade);
 
     /* Apache will supply a default error, plus the error log above. */
-    return HTTP_BAD_REQUEST;
+    return result;
 }