sector119
unread,Mar 14, 2009, 6:57:15 AM3/14/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Fast Asynchronous Python Web Server
Hi All!
I have a problem when I run my wsgi app (using pylons 0.9.7) with
Fapws3-0.2 I can't set cookie, not Set-Cookie headers send with
response, with paste server everything works fine!
My controllers/test.py:
from pylons import request, response
from pylons.controllers.util import redirect_to
from eps.lib.base import BaseController
class TestController(BaseController):
def setcookie(self):
response.set_cookie('test', 'test', max_age=10000, path='/')
return redirect_to('/')
I run app with:
% cat run.py
import sys
import paste.deploy
import fapws._evwsgi as evwsgi
from fapws import base
sys.setcheckinterval = 100000 # since we don't use threads, internal
checks are no more required
conf = {}
def main():
if len(sys.argv) != 4:
sys.exit('Usage: python run.py host:port section config')
global conf
(conf['host'], conf['port']) = sys.argv[1].split(':')
app = paste.deploy.loadapp('config:%s#%s' % (sys.argv[3], sys.argv
[2]))
start(app)
def start(wsgi_app):
evwsgi.start(conf['host'], int(conf['port']))
evwsgi.set_base_module(base)
def app(environ, start_response):
environ['wsgi.multiprocess'] = False
return wsgi_app(environ, start_response)
evwsgi.wsgi_cb(('', app))
evwsgi.run()
if __name__=='__main__':
main()
Why it can be so? Thanks a lot!