Fastcgi trouble with status headers in application_controller.rb
David Raison <david@...
2012-01-31 21:14:53 GMT
Here's number two.
I had trouble getting the http-authentication to work with fastcgi since
it seems to be very picky when it comes to headers.
I had to comment line 36 in application_controller.rb in order to not
have it complain:
[Tue Jan 31 21:37:14 2012] [error] [client 178.254.102.***] FastCGI:
comm with server
error parsing headers: duplicate header 'Status'
So in the end, my transaction_wrapper now looks like this:
response.content_type ||= Mime::HTML
# if auth succeeds we continue
elsif not performed? then
# if auth failed and nothing has been rendered we return 401
#response.headers["Status"] = "Unauthorized"
response.headers["WWW-Authenticate"] = "Basic realm=Pentabarf"