Hi Noah,
thanks it was very useful but now I'm trying to patch the wsgy.py to
add two environment variables environ['HTTP_AUTH_USER'] and
environ['HTTP_AUTH_PW'] populated with string extracted from
HTTP_AUTHORIZATION header when basic http-auth is used... the problem
now is that nothing happens if i add a line before the end of "def
setup_environ(self)" .i.e.

+        environ['TEST'] = test
          return environ

do you know why? I've tried to reboot apache and server too... but my
custom variables are wiped out... :S

thanks,

n.

On 23 Gen, 23:44, "Noah Kantrowitz" <[email protected]> wrote:
> PHP configuration won't be available outside of PHP. Headers (and the rest
> of the WSGI environment too) are available as a dict at req.environ. Hope
> that helps.
>
> --Noah
>
>
>
>
>
>
>
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]] On
> > Behalf Of novetica
> > Sent: Sunday, January 23, 2011 3:41 AM
> > To: Trac Development
> > Subject: [Trac-dev] [Newbie] Accessing PHP server variables or read
> > headers
>
> > Hi all,
> > I'm customizing some plugin and implementing some new ones... I'd like
> > to know how to get PHP server variables or request headers in Trac
> > code... Specifically I need to get PHP_AUTH_PW and PHP_AUTH_USER (that
> > seems to be mapped as $user)... Any suggestion? I've searched for req
> > object but I've not understood if it's indeed useful or not.
>
> > Thanks everyone,
>
> > N.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Trac Development" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to trac-
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/trac-dev?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to