Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/fcgi_base.py",
line 560, in run
protocolStatus, appStatus = self.server.handler(self)
File
"/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/fcgi_base.py",
line 1104, in handler
write(data)
File
"/usr/lib/python2.4/site-packages/flup-0.5-py2.4.egg/flup/server/fcgi_base.py",
line 1048, in write
assert headers_set, 'write() before start_response()'
AssertionError: write() before start_response()
I followed the FastCGI w/ mod_rewrite tutorial on the Wiki, it worked
for .8
Any ideas?
Cheers,
James
if g.user.authenticated == True:
h.redirect_to('/journal')
If I avoid any redirect calls then the application works. This was
recently ported from 0.8, is there a different or more appropriate way
to do header redirects in .9?
Thanks,
mike
I'm not sure about this in that case, perhaps Ben might know? I've added
a ticket to remind me to look into it in detail:
http://www.pylonshq.com/project/pylonshq/ticket/88
James
I've found an issue with the latest Beaker under flup-0.5 FastCGI.
Beaker was sending bad headers (a None value) during HTTP redirects.
This is probably the issue you're seeing, although the exception
traceback I saw was different:
Module pylons.error:335 in detect_start_response
return start_response(status, headers, exc_info)
Module paste.errordocument:172 in change_response
return start_response(status, headers, exc_info)
Module flup.server.fcgi_base:1102 in start_response
assert type(val) is str, 'Header values must be strings'
exceptions.AssertionError: Header values must be strings
Please give the latest Beaker a shot; I believe these are the same
issues unearthing themselves differently. To install the latest
Beaker via easy_install, do:
easy_install -U http://beaker.groovie.org/svn/trunk/Beaker
FYI: I did not see this error under the normal Paste http server. It
must do less assertion checks than flup does; I'll see if I can sync
those up or at least log a Paste ticket about it.
--
Philip Jenvey
-mike
Installing the latest beaker from the trunk as Philip suggested did the
trick.
Just thought I'd confirm Mike's success.
Chas Emerick
http://snowtide.com