[Twisted-web] Using web2 to run a Cherrpy site

David Konerding dakoner at gmail.com
Tue Mar 20 09:40:08 CST 2007


On 3/20/07, David Reid <dreid at dreid.org> wrote:
>
>
> Which version of cherrypy are you using?  I did an easy_install
> cherrypy and got 3.0.1 but your code didn't work on it.  wsgiApp is
> somewhere else now or something.


I'm using CherryPy 2.2 which I got with TurboGears tgsetup.py.
I can try CherryPy 3.0.1.


> >
> There are only 2 places we redirect like this, if we're a subclass of
> resource.Resource with addSlash=True and the url didn't end in a /,
> and if we're a static.File attached to a directory and the url didn't
> end in a /.



But WSGIResource does not do either of those things.  Which leads me
> to believe that perhaps cherrypy is causing the redirect?  I don't
> know, let me know what cherrypy version you're using and I'll try to
> play with it later.


OK, and I will try to adapt my code for CherryPy 3.0.1 as well.  If
the problem goes away with newer code, then I'm fine with it.

It's almost certainly cherrypy causing the redirect:
using the WSGI app from the twisted web2 demo, I don't see the same kind of
problem.

I still think this is a good clue:
2007-03-20 08:39:48-0700 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - -
[20/Mar/2007:08:39:48] "GET // HTTP/1.1" 302 97 "" "curl/7.15.1
(i686-suse-linux) libcurl/7.15.1 OpenSSL/0.9.8a zlib/1.2.3 libidn/0.6.0"
2007-03-20 08:39:48-0700 [-] 127.0.0.1 - - [20/Mar/2007:08:39:48 -0700] "GET
/ HTTP/1.1" 302 97 "-" "curl/7.15.1 (i686-suse-linux) libcurl/7.15.1
OpenSSL/0.9.8a zlib/1.2.3 libidn/0.6.0"

Note the 'GET //': I can't tell if that's the logging line coming from
Twisted or from CherryPy.

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20070320/8e908199/attachment.htm


More information about the Twisted-web mailing list