You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Rui Hu <tc...@gmail.com> on 2012/03/07 04:12:15 UTC

problems about mod_fastcgi

hi,

I am writing a module whose function depends on variable r->uri. But r->uri
is modified when I activate mod_fastcgi.

1. I just want to make sure whether mod_fastcgi modified r->uri.
2. How to know if mod_fastcgi is activated in my own module? So I can
handle the request differently depends on this information.

Thanks!

Vic

-- 
Best regards,

Rui Hu
----------------------------------------------------------------------------------------
State Key Laboratory of Networking & Switching Technology
Beijing University of Posts and Telecommunications(BUPT)
MSN: tchrbupt@gmail.com
-----------------------------------------------------------------------------------------

Re: problems about mod_fastcgi

Posted by Sorin Manolache <so...@gmail.com>.
On 03/07/12 04:12, Rui Hu wrote:
> hi,
>
> I am writing a module whose function depends on variable r->uri. But r->uri
> is modified when I activate mod_fastcgi.
>
> 1. I just want to make sure whether mod_fastcgi modified r->uri.
> 2. How to know if mod_fastcgi is activated in my own module? So I can
> handle the request differently depends on this information.
>

Try using the fields in r->parsed_uri instead of r->uri.

Or place a callback on an early hook (post_read_request, for example) 
and copy r->uri to a structure that is specific to your module so that 
it is guaranteed that no other module changes it.

Please be aware that r->uri can be changed by rewrite rules too.

Sorin

Re: problems about mod_fastcgi

Posted by Rui Hu <tc...@gmail.com>.
There is a strange thing happened when I use mod_fastcgi. When requested a
php script uri=/info.php, in Apache, actually, there are two requests
processed: uri=/info.php and uri=/cgi-bin/php.fcgi. And neither of them are
the other's sub-request.

However, the request related to fastcgi should be ignored in my own module.
Is there any way to recognize it?

Many thanks!

Vic

2012/3/7 Rui Hu <tc...@gmail.com>

> hi,
>
> I am writing a module whose function depends on variable r->uri. But
> r->uri is modified when I activate mod_fastcgi.
>
> 1. I just want to make sure whether mod_fastcgi modified r->uri.
> 2. How to know if mod_fastcgi is activated in my own module? So I can
> handle the request differently depends on this information.
>
> Thanks!
>
> Vic
>
> --
> Best regards,
>
> Rui Hu
>
> ----------------------------------------------------------------------------------------
> State Key Laboratory of Networking & Switching Technology
> Beijing University of Posts and Telecommunications(BUPT)
> MSN: tchrbupt@gmail.com
>
> -----------------------------------------------------------------------------------------
>
>
>


-- 
Best regards,

Rui Hu
----------------------------------------------------------------------------------------
State Key Laboratory of Networking & Switching Technology
Beijing University of Posts and Telecommunications(BUPT)
MSN: tchrbupt@gmail.com
-----------------------------------------------------------------------------------------