I am testing it using http://hurl.it and manually adding the header,
so I am fairly confident the header is getting passed(at least in
testing).  What Massimo suggested, wsgi not passing it, could be the
issue.  I have a pretty vanilla nginx install on linode.  My install
pretty much followed this script
http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh.

I will dig into the wsgi config on nginx, maybe the default config
doesn't pass custom headers.

On Jan 3, 7:06 am, Anthony <[email protected]> wrote:
> Can you confirm that the header is being sent? I just mocked up an Ajax
> request with an 'X-Twilio-Signature' header, and found it in web2py as
> request.env.http_x_twilio_signature. Try including response.toolbar() in
> your view (which is included by default in generic.html for local requests)
> and look at the contents of the request object to see what headers were
> received (all the HTTP headers start with request.env.http_, and are
> repeated as request.wsgi.environ.HTTP_).
>
> Anthony
>
>
>
>
>
>
>
> On Tuesday, January 3, 2012 1:57:21 AM UTC-5, James M. wrote:
>
> > I looked into those two suggestions, the header doesn't seem to be
> > available.
>
> > I am starting to think that custom headers aren't passed to web2py...
>
> > On Jan 2, 9:26 pm, Anthony <[email protected]> wrote:
> > > I think the 'Your-Header' header should be accessible via:
>
> > > request.env.http_your_header
>
> > > or
>
> > > request.wsgi.environ.HTTP_YOUR_HEADER
>
> > > Anthony
>
> > > On Monday, January 2, 2012 11:31:49 PM UTC-5, James M. wrote:
>
> > > > I need to get a request header that is being sent with an http post.
> > > > I thought I could access it with something like:
> > > > request.headers['HTTP_SOME_HEADER']
> > > > but it doesn't work... I looked at all request attributes and don't
> > > > see the headers.
> > > > Any idea how to get it?

Reply via email to