Hi all,
I solved this in the end. The issue is with the openid gem trying to
write to STDERR by default. The 'Premature end of script headers'
error is thrown when writing to STDERR with Passenger. The fix for
this is to set the OpenID logger in the config.ru file, e.g.
require 'cloudkit'
use Rack::Session::Pool
use CloudKit::OpenIDFilter
OpenID::Util.logger = Logger.new('log/log.log') # ADD THIS LINE
use CloudKit::Service, :collections => [:notes]
or simply
require 'cloudkit'
contain :notes
OpenID::Util.logger = Logger.new('log/log.log') # ADD THIS LINE
James
On Jun 15, 6:42 pm, crofty <james.r.cr...@googlemail.com> wrote:
> Hi,
> Passenger is throwing an error when I try and use the built in OpenID
> authentication in cloudkit. The error is
> "Premature end of script headers: login, referer:
http://simple-cloudkit.local/login"
> And the app is simply:
> #config.ru
> require 'cloudkit'
> contain :notes
> Going to "/" works, and going to "/login" works but then the error is
> thrown when clicking 'sign in'. This process works fine if I start
> the app with "rackup config.ru", the error is only thrown when using
> passenger.
> Specifying OpenID explicitly and taking out OAuth also throws the
> error:
> #config.ru
> require 'cloudkit'
> use Rack::Session::Pool
> use CloudKit::OpenIDFilter
> use CloudKit::Service, :collections => [:notes]
> If I use 'expose' instead of 'contain' everything works correctly:
> #config.ru
> require 'cloudkit'
> expose :notes
> The versions of the gems are:
> Cloudkit version: 0.11.2
> Passenger version: 2.2.2
> Any ideas on this?