durusmail: quixote-users: Quixote demo
Quixote demo
2002-11-01
2002-11-04
2002-11-04
2002-11-05
2002-11-05
Quixote demo
Greg Ward
2002-11-04
On 01 November 2002, Jim Dukarm said:
> I installed Quixote and a freshly-downloaded copy of Medusa on my
> Windows XP system (with Python 2.2.2) and, after starting the Quixote
> Medusa-based server, was unable to guess the correct URI for viewing
> the demo pages. Log entries indicate that most of the 25 or so URI's
> that I tried were processed by the Quixote machinery and ended up
> triggering a TraversalError (invalid literal for int()) on line 19 of
> integer_ui.py.

That's weird.  Can you give more detail, ie. which URL resulted in what
error message being written to which log file?

> Question: What should the URI be for running the demo with the
> Medusa server?  (I tried things like "http://cygnus/",
> "http://cygnus/Quixote/demo", etc., where "cygnus" is the hostname of
> my PC, and the server is configured to listen on cygnus port 80 and is
> definitely doing so).

Define "the server".  If Quixote-via-Medusa is listening to port 80
itself, then I would expect http://cygnus/ to work.  What does Quixote
write to its log files when you access that URL?  And which of Quixote's
three log files are enabled in your setup?

> After that experiment, I downloaded and installed the Xitami web
> server (www.xitami.com), cobbled up a CGI driver script 'qdemo' for
> the Quixote demo, and was immediately successful in running the demo.
> The driver script is simply a literal copy of the simple one suggested
> in the demo documentation.
>
> When I pointed the browser to "http://cygnus/cgi-bin/qdemo/", the
> links on the demo home page worked properly.

Good -- Quixote itself is working fine; there's just something odd with
using Quixote as its own web server.

> When I pointed the
> browser to "http://cygnus/cgi-bin/qdemo" (no trailing slash), the home
> page links were dead. For example, the 'simple' link evidently tried
> to activate "http://cygnus/cgi-bin/simple", which of course failed. If
> I typed in the URI "http://cygnus/cgi-bin/qdemo/simple", I got the
> "simple" page as expected.

Right, this stuff is all explained in gory detail in doc/demo.txt and
doc/web-server.txt (also available on the Quixote web site).  Have you
read those docs yet?

> It seems to me that if "_q_index", "simple", "error", "widgets", and
> "form_demo" are all in the "demo" namespace, which is like having
> .html files all in the same directory, then relative references such
> as those in _q_index() should always work, regardless of whether the web
> server is configured to do "magical" URI renaming (sly dig) to conceal
> the "cgi-bin/qdemo" reference in the URI's.

This is not a web server issue -- it's all client-side.  The "magical"
redirect is absolutely required for the client (browser) to get it
right.

Try creating a regular old directory in your URL-space, say "/foo", and
point your browser at it.  Your web server will almost certainly
redirect your "/foo" request to "/foo/", because it knows that otherwise
your browser will get internal redirects wrong.  (More precisely, the
browser will have a different understanding of "internal" from what you
had when you constructed that web-space.)  Web servers can do this
automatically for URL-spaces generated from the filesystem, because it's
easy to spot directories in that case.  For URL-spaces generated from a
Python package tree, though, it's not possible -- either you or Quixote
need to do the redirect.  It's just faster if you do it in the web
server config.

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

reply