mirror of
https://github.com/apache/httpd.git
synced 2025-08-06 11:06:17 +00:00
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
This commit is contained in:
13
STATUS
13
STATUS
@ -118,19 +118,6 @@ RELEASE SHOWSTOPPERS:
|
|||||||
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
|
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
|
||||||
[ start all new proposals below, under PATCHES PROPOSED. ]
|
[ start all new proposals below, under PATCHES PROPOSED. ]
|
||||||
|
|
||||||
*) Easy patches: synch 2.4.x and trunk
|
|
||||||
- cache: Use apr_pstrmemdup instead of apr_pstrndup when applicable
|
|
||||||
- cache: Remove a useless break + tiny style fix (missing space)
|
|
||||||
- vhost: save some request pool memory
|
|
||||||
- vhost: Fix some tiny style issues
|
|
||||||
- mod_dir: Save a few bytes in the request pool.
|
|
||||||
trunk patch: http://svn.apache.org/r1777556
|
|
||||||
http://svn.apache.org/r1777557
|
|
||||||
http://svn.apache.org/r1777593
|
|
||||||
http://svn.apache.org/r1777594
|
|
||||||
http://svn.apache.org/r1783056
|
|
||||||
2.4.x patch: trunk patches work
|
|
||||||
+1: jailletc36, ylavic, jim
|
|
||||||
|
|
||||||
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
|
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
|
||||||
[ New proposals should be added at the end of the list ]
|
[ New proposals should be added at the end of the list ]
|
||||||
|
5
modules/cache/cache_util.c
vendored
5
modules/cache/cache_util.c
vendored
@ -659,7 +659,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
|
|||||||
|
|
||||||
/* extract max-stale */
|
/* extract max-stale */
|
||||||
if (cache->control_in.max_stale) {
|
if (cache->control_in.max_stale) {
|
||||||
if(cache->control_in.max_stale_value != -1) {
|
if (cache->control_in.max_stale_value != -1) {
|
||||||
maxstale = cache->control_in.max_stale_value;
|
maxstale = cache->control_in.max_stale_value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -828,7 +828,7 @@ CACHE_DECLARE(const char *)ap_cache_tokstr(apr_pool_t *p, const char *list,
|
|||||||
|
|
||||||
*str = s;
|
*str = s;
|
||||||
if (i)
|
if (i)
|
||||||
return apr_pstrndup(p, list, i);
|
return apr_pstrmemdup(p, list, i);
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1160,7 +1160,6 @@ static int cache_control_remove(request_rec *r, const char *cc_header,
|
|||||||
}
|
}
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -379,10 +379,10 @@ static int fixup_dir(request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* record what we tried, mostly for the benefit of mod_autoindex */
|
/* record what we tried, mostly for the benefit of mod_autoindex */
|
||||||
apr_table_set(r->notes, "dir-index-names",
|
apr_table_setn(r->notes, "dir-index-names",
|
||||||
d->index_names ?
|
d->index_names ?
|
||||||
apr_array_pstrcat(r->pool, d->index_names, ','):
|
apr_array_pstrcat(r->pool, d->index_names, ',') :
|
||||||
AP_DEFAULT_INDEX);
|
AP_DEFAULT_INDEX);
|
||||||
|
|
||||||
/* nothing for us to do, pass on through */
|
/* nothing for us to do, pass on through */
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
|
@ -907,7 +907,7 @@ static int matches_aliases(server_rec *s, const char *host)
|
|||||||
if (names) {
|
if (names) {
|
||||||
char **name = (char **) names->elts;
|
char **name = (char **) names->elts;
|
||||||
for (i = 0; i < names->nelts; ++i) {
|
for (i = 0; i < names->nelts; ++i) {
|
||||||
if(!name[i]) continue;
|
if (!name[i]) continue;
|
||||||
if (!strcasecmp(host, name[i]))
|
if (!strcasecmp(host, name[i]))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -916,7 +916,7 @@ static int matches_aliases(server_rec *s, const char *host)
|
|||||||
if (names) {
|
if (names) {
|
||||||
char **name = (char **) names->elts;
|
char **name = (char **) names->elts;
|
||||||
for (i = 0; i < names->nelts; ++i) {
|
for (i = 0; i < names->nelts; ++i) {
|
||||||
if(!name[i]) continue;
|
if (!name[i]) continue;
|
||||||
if (!ap_strcasecmp_match(host, name[i]))
|
if (!ap_strcasecmp_match(host, name[i]))
|
||||||
return 1;
|
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) {
|
if (have_hostname_from_url && host_header != NULL) {
|
||||||
const char *repl = construct_host_header(r, is_v6literal);
|
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)
|
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02417)
|
||||||
"Replacing host header '%s' with host '%s' given "
|
"Replacing host header '%s' with host '%s' given "
|
||||||
"in the request uri", host_header, repl);
|
"in the request uri", host_header, repl);
|
||||||
|
Reference in New Issue
Block a user