durusmail: qp: erroneous trailing slash added under scgi
erroneous trailing slash added under scgi
2006-04-04
2006-04-04
2006-04-04
2006-04-04
Re: erroneous trailing slash added under scgi
2006-04-04
erroneous trailing slash added under scgi
mario ruggier
2006-04-04
Testing a site I have been working on under an scgi deployment has
caused some things to break. Tracing this, I discover that a trailing
slash is added in a specific situation, when it should not be. That
specific situation I have noticed is on a "leaf" type URL, i.e. not a
directory's index component and has no trailing slash, that also has a
querystring.

To reproduce the problem, take the proto demo in the distribution, and
modify the export that answers to '/request' by commenting out the
line:
         get_publisher().ensure_signed_in()
Thus, no auth/https complications (*).
Then deploy the site via scgi, and do the following http requests:

http://proto-test.net/request
http://proto-test.net/request?abc=123

The first request is OK, and gets the 200 response below. The second is
not... as the other server log lines below indicate:

04/04 07:56:09 200 .104478 83.113.168.22 18836 GET /request
Mozilla/5.0_ ...
04/04 07:56:22 301 .005753 83.113.168.22 18836 GET /request?abc=123
Mozilla/5.0_ ...
04/04 07:56:22 404 .011153 83.113.168.22 18836 GET /request/
Mozilla/5.0_ ...

Same behaviour with both FireFox and Safari, and with server running on
either FreeBSD or OS X, behind apache 1.3. Using python 2.4. Any ideas?

mario

(*) Or, conversely, add a totally stupid and mundane export to the
demo... one that is just a typical directory.method() type, with no
access control, no redirection to https, etc. It would be nice to have
such a mundane thing included in a demo site by default ;-)

reply