<br><br><div><span class="gmail_quote">On 3/20/07, <b class="gmail_sendername">David Reid</b> <<a href="mailto:dreid@dreid.org">dreid@dreid.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Which version of cherrypy are you using? I did an easy_install<br>cherrypy and got 3.0.1 but your code didn't work on it. wsgiApp is<br>somewhere else now or something.</blockquote><div><br>I'm using CherryPy
2.2 which I got with TurboGears tgsetup.py.<br>I can try CherryPy 3.0.1.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>>
<br>There are only 2 places we redirect like this, if we're a subclass of<br>resource.Resource with addSlash=True and the url didn't end in a /,<br>and if we're a static.File attached to a directory and the url didn't
<br>end in a /.</blockquote><div> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">But WSGIResource does not do either of those things. Which leads me
<br>to believe that perhaps cherrypy is causing the redirect? I don't<br>know, let me know what cherrypy version you're using and I'll try to<br>play with it later.</blockquote><div><br>OK, and I will try to adapt my code for CherryPy
3.0.1 as well. If<br>the problem goes away with newer code, then I'm fine with it.<br></div><br>It's almost certainly cherrypy causing the redirect:<br>using the WSGI app from the twisted web2 demo, I don't see the same kind of problem.
<br><br>I still think this is a good clue:<br>2007-03-20 08:39:48-0700 [HTTPChannel,0,<a href="http://127.0.0.1">127.0.0.1</a>] <a href="http://127.0.0.1">127.0.0.1</a> - - [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"
<br>2007-03-20 08:39:48-0700 [-] <a href="http://127.0.0.1">127.0.0.1</a> - - [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"
<br><br>Note the 'GET //': I can't tell if that's the logging line coming from Twisted or from CherryPy.<br><br>Dave<br></div><br>