apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: PATH_INFO in A2?
Date Mon, 08 Jul 2002 17:22:06 GMT
On Mon, Jul 08, 2002 at 12:12:50PM -0500, William A. Rowe, Jr. wrote:
> >>     /* Deal with the poor soul who is trying to force path_info to be
> >>      * accepted within the core_handler, where they will let the subreq
> >>      * address its contents.  This is toggled by the user in the very
> >>      * beginning of the fixup phase, so modules should override the 
> >user's
> >>      * discretion in their own module fixup phase.  It is tristate, if
> >>      * the user doesn't specify, the result is 2 (which the module may
> >>      * interpret to its own customary behavior.)  It won't be touched
> >>      * if the value is no longer undefined (2), so any module changing
> >>      * the value prior to the fixup phase OVERRIDES the user's choice.
> >>      */
> >>     if ((r->used_path_info == AP_REQ_DEFAULT_PATH_INFO)
> >>         && (conf->accept_path_info != 3)) {
> >>         r->used_path_info = conf->accept_path_info;
> >>     }
> >
> >Cool, I was meaning to ask you what the magic numbers meant here, so I
> >could document it in the header and then implement this properly for
> >PHP. Unfortunately I got sidetracked... :) Glad it came up again so
> >we can get it fixed.
> 
> from httpd.h:627;
> 
> /**
>  * @defgroup values_request_rec_used_path_info Possible values for 
> request_rec.used_path_info
>  * @{
>  * Possible values for request_rec.used_path_info:
>  */
> 
> /** Accept the path_info from the request */
> #define AP_REQ_ACCEPT_PATH_INFO    0
> /** Return a 404 error if path_info was given */
> #define AP_REQ_REJECT_PATH_INFO    1
> /** Module may chose to use the given path_info */
> #define AP_REQ_DEFAULT_PATH_INFO   2
> /** @} */

I was refering the magic numbers for accept_path_info, not used_path_info.
Are those defined anywhere?

> >So what does PHP need to do?
> 
> before fixup's...
> 
> if (r->used_path_info == AP_REQ_DEFAULT_PATH_INFO) {
>     r->used_path_info = AP_REQ_ACCEPT_PATH_INFO;
> }
> 
> after the map to storage phase... such as in the filter_init.

You make it look too easy! :) I'll implement this today unless someone
beats me to it.

-aaron

Mime
View raw message