]> granicus.if.org Git - apache/commitdiff
Abstract out as macro
authorJim Jagielski <jim@apache.org>
Sat, 26 Dec 2015 21:29:21 +0000 (21:29 +0000)
committerJim Jagielski <jim@apache.org>
Sat, 26 Dec 2015 21:29:21 +0000 (21:29 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721759 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.h
modules/proxy/mod_proxy_http.c
modules/proxy/proxy_util.c

index f97d336f038f94cba43ece43ad94c03ee6486f62..7361ab20c4de02070b714eda9134c3c761ff70be 100644 (file)
@@ -337,6 +337,13 @@ do {                             \
 (w)->s->io_buffer_size_set   = (c)->io_buffer_size_set;    \
 } while (0)
 
+#define PROXY_DO_100_CONTINUE(w, r) \
+((w)->s->ping_timeout_set \
+ && ((w)->s->ping_timeout >= 0) \
+ && (PROXYREQ_REVERSE == (r)->proxyreq) \
+ && !(apr_table_get((r)->subprocess_env, "force-proxy-request-1.0")) \
+ && ap_request_has_body((r)))
+
 /* use 2 hashes */
 typedef struct {
     unsigned int def;
index c367604b499853be8a02a49563cf72a3d9e2affd..9f3bdc710f0bcc38b72a3a40a8b5fde811b1ce49 100644 (file)
@@ -1326,11 +1326,7 @@ int ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
 
     dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
 
-    do_100_continue = (worker->s->ping_timeout_set
-                       && (worker->s->ping_timeout >= 0)
-                       && (PROXYREQ_REVERSE == r->proxyreq)
-                       && !(apr_table_get(r->subprocess_env, "force-proxy-request-1.0"))
-                       && ap_request_has_body(r));
+    do_100_continue = PROXY_DO_100_CONTINUE(worker, r);
 
     bb = apr_brigade_create(p, c->bucket_alloc);
     pass_bb = apr_brigade_create(p, c->bucket_alloc);
index 5dd0ce0d259ba04b0df345b591fcd649b1e5a694..59bfd038d3d62ea3e958c1df1019de1a17031f3c 100644 (file)
@@ -3369,11 +3369,7 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
      * We also make sure we won't be talking HTTP/1.0 as well.
      */
     fpr1 = apr_table_get(r->subprocess_env, "force-proxy-request-1.0");
-    do_100_continue = (worker->s->ping_timeout_set
-                       && (worker->s->ping_timeout >= 0)
-                       && (PROXYREQ_REVERSE == r->proxyreq)
-                       && !(fpr1)
-                       && ap_request_has_body(r));
+    do_100_continue = PROXY_DO_100_CONTINUE(worker, r);
 
     if (fpr1) {
         /*