httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-2.0/server util_xml.c
Date Mon, 03 Jun 2002 07:53:42 GMT
jerenkrantz    2002/06/03 00:53:42

  Modified:    server   util_xml.c
  Log:
  Style police come before the code police.
  (No functional changes.)
  
  Revision  Changes    Path
  1.20      +29 -28    httpd-2.0/server/util_xml.c
  
  Index: util_xml.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util_xml.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- util_xml.c	17 May 2002 11:11:38 -0000	1.19
  +++ util_xml.c	3 Jun 2002 07:53:42 -0000	1.20
  @@ -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 @@
       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 */
  
  
  

Mime
View raw message