diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2017-01-06 12:52:15 +0100 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2017-01-06 12:52:15 +0100 |
commit | 9adefaa2cfb53fb7673a8e700fead334a8648c63 (patch) | |
tree | 1dbae6c673666bc04a7a54380055399e21c69c4b /server/vhost.c | |
parent | Remove a useless break + tiny style fix (missing space) (diff) | |
download | apache2-9adefaa2cfb53fb7673a8e700fead334a8648c63.tar.xz apache2-9adefaa2cfb53fb7673a8e700fead334a8648c63.zip |
'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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777593 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/vhost.c')
-rw-r--r-- | server/vhost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/vhost.c b/server/vhost.c index c4bd846f7d..0de160366d 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -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); |