From: Brian Pane Date: Sun, 2 Dec 2001 10:33:01 +0000 (+0000) Subject: Exclude the terminating null byte from the length of X-Git-Tag: 2.0.30~309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc863660b98531cb3150dd8901b1022f34ddd070;p=apache Exclude the terminating null byte from the length of strings passed to apr_hash_get/apr_hash_set (this matches the convention used throughout the rest of the httpd, and it saves a small amount of processing) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92283 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 07ea081963..5691826d83 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -2859,7 +2859,7 @@ static apr_status_t send_parsed_content(apr_bucket_brigade **bb, handle_func = (include_handler_fn_t *)apr_hash_get(include_hash, ctx->combined_tag, - ctx->directive_length+1); + ctx->directive_length); if (handle_func != NULL) { rv = (*handle_func)(ctx, bb, r, f, dptr, &content_head); if ((rv != 0) && (rv != 1)) { @@ -3116,7 +3116,7 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b) static void ap_register_include_handler(char *tag, include_handler_fn_t *func) { - apr_hash_set(include_hash, tag, strlen(tag) + 1, (const void *)func); + apr_hash_set(include_hash, tag, strlen(tag), (const void *)func); } static int include_post_config(apr_pool_t *p, apr_pool_t *plog,