]> granicus.if.org Git - apache/commitdiff
Merge r1626050 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 27 Oct 2014 12:45:34 +0000 (12:45 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 27 Oct 2014 12:45:34 +0000 (12:45 +0000)
Concat string at compile time when possible.
Doing so, sometimes also give the opportunity to turn a 'ap_fputstrs' into a 'ap_fputs'.
PR 53741
Submitted by: jailletc36
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1634525 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/arch/netware/mod_nw_ssl.c
modules/http/http_filters.c
modules/mappers/mod_dir.c
modules/proxy/mod_proxy_balancer.c
modules/ssl/ssl_engine_kernel.c

diff --git a/CHANGES b/CHANGES
index d2d23b448a02d474fb0ddbd3a057d76cda3cb642..d5410705f96735a8d570cde2dd3abc6b59fa1b77 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 
 Changes with Apache 2.4.11
 
+  *) Concat strings at compile time when possible. PR 53741.
+
   *) mod_substitute: Restrict configuration in .htaccess to
      FileInfo as documented.  [Rainer Jung]
 
diff --git a/STATUS b/STATUS
index abe30084fdb7c4ba567803a40f6a7d33aa7a2b45..e06f637ad540d61580145c26ba5151119a873ff5 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -102,11 +102,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * various: Concat string at compile time when possible.
-     trunk patch: http://svn.apache.org/r1626050
-     2.4.x patch: trunk works
-     +1: jailletc36, rjung, jim
-
    * event: Fix worker-listener deadlock in graceful restart caused by
      get_worker() allocating new worker after ap_queue_info_term(),
      but not setting the have_idle_worker variable. PR 56960.
index cf535d33e277b8351b620bb5b5f7b8d2f9da58ac..d34430023e4e3c7ab806faab461b821d28401d9d 100644 (file)
@@ -1192,8 +1192,8 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
     /* Send the interim 101 response. */
     upgradebb = apr_brigade_create(r->pool, f->c->bucket_alloc);
 
-    ap_fputstrs(f->next, upgradebb, SWITCH_STATUS_LINE, CRLF,
-                UPGRADE_HEADER, CRLF, CONNECTION_HEADER, CRLF, CRLF, NULL);
+    ap_fputs(f->next, upgradebb, SWITCH_STATUS_LINE CRLF
+             UPGRADE_HEADER CRLF CONNECTION_HEADER CRLF CRLF);
 
     b = apr_bucket_flush_create(f->c->bucket_alloc);
     APR_BRIGADE_INSERT_TAIL(upgradebb, b);
index 0b8600962f4ed4bf699d05931dfabdda458d4024..733e9c82adad1e2040a7ff1181b148f69fd368f8 100644 (file)
@@ -411,7 +411,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
                  * in a state of expecting one.
                  */
                 f->r->expecting_100 = 0;
-                tmp = apr_pstrcat(f->r->pool, AP_SERVER_PROTOCOL, " ",
+                tmp = apr_pstrcat(f->r->pool, AP_SERVER_PROTOCOL " ",
                                   ap_get_status_line(HTTP_CONTINUE), CRLF CRLF,
                                   NULL);
                 len = strlen(tmp);
index 2a359c7fa5018f415f6b1a3798c9b6e34de46eb6..542236b54f42c248f33baaf808e2cb700b545a53 100644 (file)
@@ -262,7 +262,7 @@ static int fixup_dir(request_rec *r)
 
         if (r->args != NULL) {
             ifile = apr_pstrcat(r->pool, ap_escape_uri(r->pool, r->uri),
-                                "/", "?", r->args, NULL);
+                                "/?", r->args, NULL);
         }
         else {
             ifile = apr_pstrcat(r->pool, ap_escape_uri(r->pool, r->uri),
index acfd3861dec4ea43fda000eb57d255262932bbb2..f33aa936d5ec929e67e56a920b4d816b97487b1c 100644 (file)
@@ -98,7 +98,7 @@ static int proxy_balancer_canon(request_rec *r, char *url)
     if (path == NULL)
         return HTTP_BAD_REQUEST;
 
-    r->filename = apr_pstrcat(r->pool, "proxy:", BALANCER_PREFIX, host,
+    r->filename = apr_pstrcat(r->pool, "proxy:" BALANCER_PREFIX, host,
             "/", path, (search) ? "?" : "", (search) ? search : "", NULL);
 
     r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
index 3f905e7b865328f51355cff52f0a3f952ad1e313..e295560bec5c0c92d54f969c653f3af9b7505c99 100644 (file)
@@ -54,8 +54,8 @@ static apr_status_t upgrade_connection(request_rec *r)
 
     bb = apr_brigade_create(r->pool, conn->bucket_alloc);
 
-    rv = ap_fputstrs(conn->output_filters, bb, SWITCH_STATUS_LINE, CRLF,
-                     UPGRADE_HEADER, CRLF, CONNECTION_HEADER, CRLF, CRLF, NULL);
+    rv = ap_fputs(conn->output_filters, bb, SWITCH_STATUS_LINE CRLF
+                  UPGRADE_HEADER CRLF CONNECTION_HEADER CRLF CRLF);
     if (rv == APR_SUCCESS) {
         APR_BRIGADE_INSERT_TAIL(bb,
                                 apr_bucket_flush_create(conn->bucket_alloc));