Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
OpenID and Passenger throwing Premature end of script headers
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
crofty  
View profile  
 More options Jun 15 2009, 6:42 pm
From: crofty <james.r.cr...@googlemail.com>
Date: Mon, 15 Jun 2009 15:42:05 -0700 (PDT)
Local: Mon, Jun 15 2009 6:42 pm
Subject: [Cloudkit] OpenID and Passenger throwing Premature end of script headers
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?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
crofty  
View profile  
 More options Jun 15 2009, 10:59 pm
From: crofty <james.r.cr...@googlemail.com>
Date: Mon, 15 Jun 2009 19:59:18 -0700 (PDT)
Local: Mon, Jun 15 2009 10:59 pm
Subject: Re: OpenID and Passenger throwing Premature end of script headers
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »