[Catalyst] Authorization header and fastcgi

Ian Docherty catalyst at iandocherty.com
Fri Feb 20 00:43:23 GMT 2009


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




More information about the Catalyst mailing list