[Catalyst] Authorization header and fastcgi

Ian Docherty catalyst at iandocherty.com
Fri Feb 20 08:20:34 GMT 2009


Mark.
I was not looking at $c->engine->env, but now that I am, there is no 
Authorization or HTTP_AUTHORIZATION there either.

I have decided to side-step this issue and create an 'Authentication' 
header rather than an 'Authorization' header and to hell with the 
'standard'.

(Besides the 'standard' is badly named anyway!)

Thanks everyone for help with this matter.

Regards
Ian

Mark Trostler wrote:
> are you looking in  $c->engine->env?
>     Mark
>
> Ian Docherty wrote:
>> Matt Pitts wrote:
>>>> -----Original Message-----
>>>> From: Ian Docherty [mailto:catalyst at iandocherty.com]
>>>> Sent: Tuesday, February 17, 2009 9:51 AM
>>>> To: The elegant MVC web framework
>>>> Subject: [Catalyst] Authorization header and fastcgi
>>>>
>>>> Hi
>>>> The 'Authorization' header is not being passed to my Catalyst
>>>> application.
>>>>
>>>> I have read the archives about fastcgi not passing the header and I
>>>> have
>>>> tried the following in my Apache 2 config
>>>>
>>>> RewriteCond %{HTTP:Authorization} ^(.+)
>>>> RewriteRule ^(.*)$ $1 [E=HTTP_AUTHORIZATION:%1,PT]
>>>>
>>>> FastCgiIpcDir /var/fcgi_ipc
>>>> FastCgiServer
>>>> /var/www/www.pharmaventures.com/script/pharmaventures_fastcgi.pl
>>>> -pass-header HTTP_AUTHORIZATION -pass-header Authorization -processes
>>>>     
>>> 5
>>>  
>>>> -initial-env PV_DEBUG=0 -initial-env PV_HBX=1 -initial-env
>>>> PV_DSN=dbi:mysql:port=3306:host=127.0.0.1
>>>>
>>>> I don't see a header and I don't see any environment variable in my
>>>>     
>>> Cat
>>>  
>>>> app.
>>>>
>>>> I have tried variations on the -pass-header Authorization -pass-header
>>>> AUTHORIZATION but neither works.
>>>>
>>>> Any other ideas?
>>>>     
>>>
>>> The following is working for me in Apache 2.2 with 
>>> FastCgiExternalServer
>>> and Cat 5.8014
>>>
>>> RewriteEngine On
>>> RewriteCond %{HTTP:Authorization} ^(.+)
>>> RewriteRule ^(.*)$ $1 [E=HTTP_AUTHORIZATION:%1,PT]
>>>
>>> Without any special declarations on my FastCgiExternalServer directive.
>>>
>>> Could it be something specific to running the FastCGI internal vs.
>>> external?
>>>
>>> Did you forget to turn "RewriteEngine On"?
>>>
>>> v/r
>>> -matt pitts
>>>
>>> ______
>> 'RewriteEngine On' was there, it makes no difference.
>>
>> I too am on Cat 5.7014
>>
>> I will experiment with changing between FastCGI static and dynamic 
>> mode to see if that makes any difference.
>>
>> Regards
>> Ian
>>
>>
>> _______________________________________________
>> List: Catalyst at lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive: 
>> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>>
>>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: 
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>




More information about the Catalyst mailing list