httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: windows build & handler hook
Date Mon, 08 Jan 2001 20:51:56 GMT
On Mon, Jan 08, 2001 at 02:03:56PM -0500, Allan Edwards wrote:
>...
> --- modules/cache/mod_file_cache.c	2000/12/13 13:22:51	1.34
> +++ modules/cache/mod_file_cache.c	2001/01/08 18:43:33
> @@ -416,12 +416,16 @@
>      return OK;
>  }
>  
> -static int file_cache_handler(request_rec *r) 
> +static int file_cache_handler(const char *handler, request_rec *r) 
>  {
>      a_file *match;
>      int errstatus;
>      int rc = OK;
>  
> +    if (strcmp(handler, "*.*")) {
> +        return DECLINED;
> +    }
> +
>      /* we don't handle anything but GET */
>      if (r->method_number != M_GET) return DECLINED;
>  
> @@ -473,6 +477,7 @@
>  
>  static void register_hooks(void)
>  {
> +    ap_hook_handler(file_cache_handler, NULL, NULL, AP_HOOK_MIDDLE);
>      ap_hook_post_config(file_cache_post_config, NULL, NULL, AP_HOOK_MIDDLE);
>      ap_hook_translate_name(file_cache_xlat, NULL, NULL, AP_HOOK_MIDDLE);
>      /* This trick doesn't work apparently because the translate hooks
> @@ -483,12 +488,6 @@
>  
>  }
>  
> -static const handler_rec file_cache_handlers[] =
> -{
> -    { "*/*", file_cache_handler },
> -    { NULL }
> -};
> -

I think the strcmp() in hook function should just go away. Isn't that what
"*/*" means? That it applies to all types?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message