]> granicus.if.org Git - apache/commitdiff
Style police come before the code police.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 3 Jun 2002 07:53:42 +0000 (07:53 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 3 Jun 2002 07:53:42 +0000 (07:53 +0000)
(No functional changes.)

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

server/util_xml.c

index 2fb194af2b14006ce6230569da3527db985edbed..becc2bdd6849d0677b5a0b74f5d6ec020bcb592d 100644 (file)
@@ -62,7 +62,8 @@
 #include "util_xml.h"
 
 
-#define READ_BLOCKSIZE 2048    /* used for reading input blocks */
+/* used for reading input blocks */
+#define READ_BLOCKSIZE 2048
 
 
 AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
@@ -73,42 +74,42 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
     char errbuf[200];
 
     if ((result = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) != OK)
-       return result;
+        return result;
 
     if (r->remaining == 0) {
-       *pdoc = NULL;
-       return OK;
+        *pdoc = NULL;
+        return OK;
     }
 
     parser = apr_xml_parser_create(r->pool);
 
     if (ap_should_client_block(r)) {
-       long len;
-       char *buffer;
-       apr_size_t total_read = 0;
-       apr_size_t limit_xml_body = ap_get_limit_xml_body(r);
-
-       /* allocate our working buffer */
-       buffer = apr_palloc(r->pool, READ_BLOCKSIZE);
-
-       /* read the body, stuffing it into the parser */
-       while ((len = ap_get_client_block(r, buffer, READ_BLOCKSIZE)) > 0) {
-           total_read += len;
-           if (limit_xml_body && total_read > limit_xml_body) {
-               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);
-               goto read_error;
-           }
+        long len;
+        char *buffer;
+        apr_size_t total_read = 0;
+        apr_size_t limit_xml_body = ap_get_limit_xml_body(r);
+
+        /* allocate our working buffer */
+        buffer = apr_palloc(r->pool, READ_BLOCKSIZE);
+
+        /* read the body, stuffing it into the parser */
+        while ((len = ap_get_client_block(r, buffer, READ_BLOCKSIZE)) > 0) {
+            total_read += len;
+            if (limit_xml_body && total_read > limit_xml_body) {
+                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);
+                goto read_error;
+            }
 
             status = apr_xml_parser_feed(parser, buffer, len);
-           if (status)
-               goto parser_error;
-       }
-       if (len == -1) {
-           /* ap_get_client_block() has logged an error */
-           goto read_error;
-       }
+            if (status)
+                goto parser_error;
+        }
+        if (len == -1) {
+            /* ap_get_client_block() has logged an error */
+            goto read_error;
+        }
     }
 
     /* tell the parser that we're done */