diff options
author | Jim Jagielski <jim@apache.org> | 2017-03-29 17:15:29 +0000 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2017-03-29 17:15:29 +0000 |
commit | 1bc416af179e16ab2f3c49effb12b0cd9b9c2bcc (patch) | |
tree | 161e461bbcfede3a47e6786cfb0bf809f7fa3d06 /server | |
parent | 6fc24d045dd057ff4aec31b6d62d1047db1ed0f2 (diff) | |
download | httpd-1bc416af179e16ab2f3c49effb12b0cd9b9c2bcc.tar.gz |
Merge r1777556, r1777557, r1777593, r1777594, r1783056 from trunk:
Use apr_pstrmemdup instead of apr_pstrndup when applicable
Remove a useless break + tiny style fix (missing space)
'repl' is already allocated in the request pool by 'construct_host_header()' the line just before.
So this is safe to use the 'apr_table_setn' variant in order to save a few bytes of memory.
Fix some tiny style issues (missing space)
Save a few bytes in the request pool.
Submitted by: jailletc36
Reviewed by: jailletc36, ylavic, jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1789393 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r-- | server/vhost.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/vhost.c b/server/vhost.c index c4bd846f7d..5ad4efd381 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -907,7 +907,7 @@ static int matches_aliases(server_rec *s, const char *host) if (names) { char **name = (char **) names->elts; for (i = 0; i < names->nelts; ++i) { - if(!name[i]) continue; + if (!name[i]) continue; if (!strcasecmp(host, name[i])) return 1; } @@ -916,7 +916,7 @@ static int matches_aliases(server_rec *s, const char *host) if (names) { char **name = (char **) names->elts; for (i = 0; i < names->nelts; ++i) { - if(!name[i]) continue; + if (!name[i]) continue; if (!ap_strcasecmp_match(host, name[i])) return 1; } @@ -1163,7 +1163,7 @@ AP_DECLARE(void) ap_update_vhost_from_headers(request_rec *r) */ if (have_hostname_from_url && host_header != NULL) { const char *repl = construct_host_header(r, is_v6literal); - apr_table_set(r->headers_in, "Host", repl); + apr_table_setn(r->headers_in, "Host", repl); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02417) "Replacing host header '%s' with host '%s' given " "in the request uri", host_header, repl); |