You normally see errors like that when a middleware layer forgets to
call the response iterator's close method.
I've not used uwsgi before so I don't have any idea as to whether this
could be a factor, or whether there's a bug in pesto or any other
middleware in use. I just tried installing uwsgi, but so far I'm not
having much luck with getting it to run on my system at all :( I'll have
another go later on when I have some more time to look into it.
You could also try putting wsgiref.validate.validator into your stack,
I've found this to be useful for sniffing out any misbehaving middleware
layers.
Olly.
http://www.python.org/dev/peps/pep-3333/
> However, from what I
> gathered, SCRIPT_NAME is typically the primary component and PATH_INFO
> what's left. For instance, for a php script:
>
> /app1/myscript.php/item/edit
>
> SCRIPT_NAME = /app1/myscript.php
> PATH_INFO = /item/edit
>
Yes, that's correct.
> In the case of a WSGI app, there really is no script name, so I would
> expect this:
>
The general rule is that SCRIPT_NAME is the location where your
application is mounted, and put together with PATH_INFO will show you
the full request path.
The one small exception is that if you app is mounted at the root
location, '/', then SCRIPT_NAME should be set to an empty string. For
example a request for '/item/edit' would be passed:
SCRIPT_NAME = ''
PATH_INFO = '/item/edit'
But if your app was mounted at '/app1' then a request for
'/app1/item/edit' would look like this:
SCRIPT_NAME = '/app1'
PATH_INFO = '/item/edit'
It's up to you when configuring nginx/flup to decide which location you
want your app to run from and make sure the SCRIPT_NAME/PATH_INFO are
correctly set. The flask docs have some good configuration examples
showing how to mount WSGI applications at any location:
http://flask.pocoo.org/docs/deploying/fastcgi/#configuring-nginx
Cheers,
Olly.