]> granicus.if.org Git - apache/commitdiff
Move definition of ASCII_ZERO to httpd.h and rename it ZERO_ASCII for consistancy...
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 6 Jan 2017 13:58:03 +0000 (13:58 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 6 Jan 2017 13:58:03 +0000 (13:58 +0000)
Remove definition of ASCII_CRLF which is the same as CRLF_ASCII.

Use ZERO_ASCII and CRLF_ASCII in mod_proxy_http

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

include/httpd.h
modules/proxy/mod_proxy_http.c

index dec6706bd9e91fe572773a64e52b37c4f53f5542..ebb2a15b4cc9006cce3f250435430f134ed300fc 100644 (file)
@@ -690,6 +690,7 @@ struct ap_method_list_t {
 #endif /* APR_CHARSET_EBCDIC */
 /** Useful for common code with either platform charset. */
 #define CRLF_ASCII "\015\012"
+#define ZERO_ASCII "\060"
 
 /**
  * @defgroup values_request_rec_body Possible values for request_rec.read_body
index ae6384424c167419aba148209c0848b1d0575164..fc9c0440216fbdf5e807ae0eeb68ba68992f22f2 100644 (file)
@@ -213,16 +213,13 @@ static void add_cl(apr_pool_t *p,
     APR_BRIGADE_INSERT_TAIL(header_brigade, e);
 }
 
-#define ASCII_CRLF  "\015\012"
-#define ASCII_ZERO  "\060"
-
 static void terminate_headers(apr_bucket_alloc_t *bucket_alloc,
                               apr_bucket_brigade *header_brigade)
 {
     apr_bucket *e;
 
     /* add empty line at the end of the headers */
-    e = apr_bucket_immortal_create(ASCII_CRLF, 2, bucket_alloc);
+    e = apr_bucket_immortal_create(CRLF_ASCII, 2, bucket_alloc);
     APR_BRIGADE_INSERT_TAIL(header_brigade, e);
 }
 
@@ -281,7 +278,7 @@ static int stream_reqbody_chunked(apr_pool_t *p,
             /*
              * Append the end-of-chunk CRLF
              */
-            e = apr_bucket_immortal_create(ASCII_CRLF, 2, bucket_alloc);
+            e = apr_bucket_immortal_create(CRLF_ASCII, 2, bucket_alloc);
             APR_BRIGADE_INSERT_TAIL(input_brigade, e);
         }
 
@@ -357,14 +354,14 @@ static int stream_reqbody_chunked(apr_pool_t *p,
         bb = input_brigade;
     }
 
-    e = apr_bucket_immortal_create(ASCII_ZERO ASCII_CRLF
+    e = apr_bucket_immortal_create(ZERO_ASCII CRLF_ASCII
                                    /* <trailers> */
-                                   ASCII_CRLF,
+                                   CRLF_ASCII,
                                    5, bucket_alloc);
     APR_BRIGADE_INSERT_TAIL(bb, e);
 
     if (apr_table_get(r->subprocess_env, "proxy-sendextracrlf")) {
-        e = apr_bucket_immortal_create(ASCII_CRLF, 2, bucket_alloc);
+        e = apr_bucket_immortal_create(CRLF_ASCII, 2, bucket_alloc);
         APR_BRIGADE_INSERT_TAIL(bb, e);
     }
 
@@ -426,7 +423,7 @@ static int stream_reqbody_cl(apr_pool_t *p,
                 apr_bucket_delete(e);
 
                 if (apr_table_get(r->subprocess_env, "proxy-sendextracrlf")) {
-                    e = apr_bucket_immortal_create(ASCII_CRLF, 2,
+                    e = apr_bucket_immortal_create(CRLF_ASCII, 2,
                                                    bucket_alloc);
                     APR_BRIGADE_INSERT_TAIL(input_brigade, e);
                 }
@@ -665,7 +662,7 @@ static int spool_reqbody_cl(apr_pool_t *p,
         apr_brigade_insert_file(header_brigade, tmpfile, 0, fsize, p);
     }
     if (apr_table_get(r->subprocess_env, "proxy-sendextracrlf")) {
-        e = apr_bucket_immortal_create(ASCII_CRLF, 2, bucket_alloc);
+        e = apr_bucket_immortal_create(CRLF_ASCII, 2, bucket_alloc);
         APR_BRIGADE_INSERT_TAIL(header_brigade, e);
     }
     return OK;