httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] mod_mime and virtual requests
Date Thu, 05 Sep 2002 00:26:13 GMT
On Wed, Sep 04, 2002 at 02:13:43PM -0700, Justin Erenkrantz wrote:
> This patch does the following things:
> 
> - Morphs ap_run_sub_req-invoked handler's DONE to OK.
>   (Fixes mod_dav always returning DONE and mod_include treating it
>    as an error.)

How is a subrequest normally involved in a plain old GET against an SVN
repository? Or was this to solve another situation?

> - Adds 'ModMimeUsePathInfo' flag directive which tells mod_mime to
>   use the full URI to do type lookups rather than r->filename.

Hmm. You should be using path_info, then. Your code uses r->uri which might
have queries, params, etc.

> - Allows mod_dav to be involved for subreqs.
> - Switches mod_dav to use fixups for its handler config to allow
>   mod_mime to run.

Hmm. We might not even need the fixup. Now that *every* handler is executed
nowadays, we can probably just remove the concept of "dav-handler" and move
those checks in type_checker/fixups into dav_handler() itself.

> Any complaints before committing?

Not complaints, per se... :-)

> I can now serve mod_include-based pages directly out of SVN.
> Woo!

Sweet! That is awesome...

> If PHP worked on non-file-backed data, it would work
> too.  -- justin

Fooey.

>...
> +++ modules/dav/main/mod_dav.c	4 Sep 2002 21:07:25 -0000
> @@ -4429,8 +4429,8 @@
>          return DECLINED;
>      }
>  
> -    /* quickly ignore any HTTP/0.9 requests */
> -    if (r->assbackwards) {
> +    /* quickly ignore any HTTP/0.9 requests which aren't subreqs. */
> +    if (r->assbackwards && !r->main) {

Hunh? Subrequests are marked as assbackwards? Hmm. Guess that can make sense
-- we shouldn't be looking at headers_in. But if that is the case, then you
better make sure that mod_dav is skipping any examination of headers for
these cases!

(or does subreq->headers_in contain nothing?)

I'm just not clear on the assbackwards thing, and what this change is about.

>...
> @@ -776,10 +787,17 @@
>                                                     &mime_module);
>      exception_list = apr_array_make(r->pool, 2, sizeof(char *));
>  
> +    if (!conf->use_path_info) {
> +        resource_name = r->filename;
> +    }
> +    else {
> +        resource_name = r->uri;

This is what I was referring to above.

Cheers.
-g

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

Mime
View raw message