You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by luca regini <lu...@gmail.com> on 2005/06/22 10:05:13 UTC

Accessing to per Directory configuration from an input filter: HOW?

I need to write an input filter that is able to change the value of some 
cookies. However the name of the cookie to be changed is a per- directory 
value. So i have an input filter whose behavior depends programmatically 
from per-directory configuration. How should i gain information about per 
-dir configuration from within a filter??
  Thanks in advance 
Luca

Re: Accessing to per Directory configuration from an input filter: HOW?

Posted by luca regini <lu...@gmail.com>.
Sorry if i disturb you but i still don't manage to solve my problems. Is it 
possible to alter cookie in the header_parser hook?? I don't mean to alter 
the value of the apr_table of the apache server that contains cookie values 
i really mean changing cookies in the request so that some underling (mostly 
java) web applications can se the right value for these special cookies. We 
are trying to reproduce the functioning of a security infracstructure 
developed originally for MS. It would really be a pity if we don't manage to 
do with apache what we alreay have in production with IIS.
 Thanks in advance for your attention.
Luca


 On 6/22/05, Nick Kew <ni...@webthing.com> wrote: 
> 
> luca regini wrote:
> > I need to write an input filter that is able to change the value of some
> > cookies. However the name of the cookie to be changed is a per- 
> directory
> > value. So i have an input filter whose behavior depends programmatically
> > from per-directory configuration. How should i gain information about 
> per
> > -dir configuration from within a filter??
> > Thanks in advance
> > Luca
> >
> 
> Same as from anywhere else.
> 
> But you don't want to do that in an input filter. Use the header_parser
> hook. Or, if it needs to happen before/after some other module which
> views cookies in a different hook, move as appropriate.
> 
> --
> Nick Kew
>

Re: Accessing to per Directory configuration from an input filter: HOW?

Posted by luca regini <lu...@gmail.com>.
I am not able to find any example of use of this hook to alter the value of 
a cookie. For my ( limited and erroneous) understanding an hook cannot alter 
requests nor produce content. This are tasks made for filters.
 Luca

 On 6/22/05, Nick Kew <ni...@webthing.com> wrote: 
> 
> luca regini wrote:
> > I need to write an input filter that is able to change the value of some
> > cookies. However the name of the cookie to be changed is a per- 
> directory
> > value. So i have an input filter whose behavior depends programmatically
> > from per-directory configuration. How should i gain information about 
> per
> > -dir configuration from within a filter??
> > Thanks in advance
> > Luca
> >
> 
> Same as from anywhere else.
> 
> But you don't want to do that in an input filter. Use the header_parser
> hook. Or, if it needs to happen before/after some other module which
> views cookies in a different hook, move as appropriate.
> 
> --
> Nick Kew
>

Re: Accessing to per Directory configuration from an input filter: HOW?

Posted by luca regini <lu...@gmail.com>.
I add to my previous mail that the ctx parameter in the ap_add_output_filter 
function can be used to pass an arbitrary structure to the filter. So this 
should be the right place to pass information to the filter.
 Luca
 
 On 6/22/05, Nick Kew <ni...@webthing.com> wrote: 
> 
> luca regini wrote:
> > I need to write an input filter that is able to change the value of some
> > cookies. However the name of the cookie to be changed is a per- 
> directory
> > value. So i have an input filter whose behavior depends programmatically
> > from per-directory configuration. How should i gain information about 
> per
> > -dir configuration from within a filter??
> > Thanks in advance
> > Luca
> >
> 
> Same as from anywhere else.
> 
> But you don't want to do that in an input filter. Use the header_parser
> hook. Or, if it needs to happen before/after some other module which
> views cookies in a different hook, move as appropriate.
> 
> --
> Nick Kew
>

Re: Accessing to per Directory configuration from an input filter: HOW?

Posted by Nick Kew <ni...@webthing.com>.
luca regini wrote:
> I need to write an input filter that is able to change the value of some 
> cookies. However the name of the cookie to be changed is a per- directory 
> value. So i have an input filter whose behavior depends programmatically 
> from per-directory configuration. How should i gain information about per 
> -dir configuration from within a filter??
>   Thanks in advance 
> Luca
> 

Same as from anywhere else.

But you don't want to do that in an input filter.  Use the header_parser
hook.  Or, if it needs to happen before/after some other module which
views cookies in a different hook, move as appropriate.

-- 
Nick Kew