durusmail: quixote-users: An issue
An issue
2001-11-22
2001-11-23
2001-11-23
2001-11-23
2001-11-23
An issue
Greg Ward
2001-11-23
On 22 November 2001, Mikhail Sobolev said:
> I have a namespace accessible as /private/log, the base URL is /probe.
> So in my browser I try the following URLs:
>
>     http://localhost/probe/private/log
>     http://localhost/probe/private/log/
>     http://localhost/probe/private/log/?entry=1
>     http://localhost/probe/private/log?entry=1
>
> The first URL redirects me to the second and everything works okay in
> both casess.  The third URL gives me something reasonable [and
> different from the second case].

OK, all makes sense so far.

> The fourth case results in error 404.

Right: the URL for a namespace must have a trailing slash; the URL for a
callable must not.  #1 redirects you to #2 purely as a convenience
measure.  (It's the same as with directories and files in a
filesystem-based web site: if you access "/foo" where "/www/htdocs/foo"
is a directory, the web server redirects you to "/foo/".)

Hmmm... I wonder why #4 doesn't get redirected to #3.  It probably
should, for consistency with the #1 -> #2 redirect.

Ooh, things are not so simple.  Our web site uses a similar feature; if
you go to
  http://fab.mems-exchange.org/user/?/foo

you will login and then be redirected to /foo.  (That way, we can let
people poke around the site and login only when they try to do something
that requires authorization.)  The URL looks funny because of the "/?/",
but it makes sense if you think about it -- and, more importantly, it
works!

However, if I try to access
  http://fab.mems-exchange.org/user?/foo
then I am redirected to
  http://fab.mems-exchange.org/user/
-- ie. the fix-trailing-slash redirect *is* done, but it loses the query
string.  Oops!

I think that's a bug, but it's not consistent with what you're seeing,
Mikhail.  Are you running Quixote 0.4.2?  (Should be revision 1.103 of
publish.py.)

        Greg
--
Greg Ward - software developer                gward@mems-exchange.org
MEMS Exchange                            http://www.mems-exchange.org


reply