michelts wrote:
> Hi guys!
>
> I trying wsgikit, I could follow the docs with sucess but I have some questions:
>
> - Is there an adapter like mod_webkit2 wsgikit?
This is more of a server issue, though I want to add glue to wsgikit for
a useful set of servers. This SCGI server would probably be the best
direction for this at this point:
http://www.idyll.org/~t/www-tools/wsgi/README.html -- there's also an
SCGI server at http://www.saddi.com/software/py-lib/#scgi
There's nothing particularly special about mod_webkit, it's essentially
equivalent to scgi. I think it would be convenient if Twisted also
supported one of these protocols, but I don't believe it does right now.
> - Is there a way to insert the session cookie on the url (like the
> AutomaticPathSession on webware)?
It would require a little hacking, but the basic hooks are there. If
you put a urlparser_hook function in your __init__.py, you could do:
def urlparser_hook(environ):
session_var, rest =
wsgilib.path_info_split(environ.get('PATH_INFO', ''))
if session_var and session_var.startswith('SID='):
environ['wsgikit.session_id'] = session_var
environ['SCRIPT_NAME'] += session_var
environ['PATH_INFO'] = rest
*But* right now the session middleware won't look for that
'wsgikit.session_id' variable. That would be a useful addition there.
There are problems with the session code anyway. I'd like to use
http://www.saddi.com/software/py-lib/#Session in lieu of the code that's
currently in there.
> - Are there much people using it in daily projects?
I'm not sure. I am using it for one new project at work, and planning
on using it for another that's coming up, though the majority of our
Webware code is using 0.8.1. WSGIKit includes a fair number of tests,
and I've encountered very few problems in my own use.
--
Ian Bicking / ianb@... / http://blog.ianbicking.org
|