From: Justin Erenkrantz Date: Mon, 3 Jun 2002 07:53:42 +0000 (+0000) Subject: Style police come before the code police. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=287466b087f7bf6c94ee50bf8a796006f3f2d7e3;p=apache Style police come before the code police. (No functional changes.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95481 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_xml.c b/server/util_xml.c index 2fb194af2b..becc2bdd68 100644 --- a/server/util_xml.c +++ b/server/util_xml.c @@ -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 */