]> granicus.if.org Git - apache/commitdiff
Exclude the terminating null byte from the length of
authorBrian Pane <brianp@apache.org>
Sun, 2 Dec 2001 10:33:01 +0000 (10:33 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 2 Dec 2001 10:33:01 +0000 (10:33 +0000)
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

modules/filters/mod_include.c

index 07ea081963651484b6f4e62d9d0d0e6b0c2ff4be..5691826d83e2dfaa6a49ddf2d0376f233ed4a9b5 100644 (file)
@@ -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,