Peculiarity with putChild() using the root of the webserver

Rich Brown <[email protected]>
Newsgroups gmane.comp.python.twisted.web
Message-ID <CAF-ggVNWo7_10OHyZ20tLzapzoZ+hbXejujUkOpnRkVpiQ8zmA@mail.gmail.com>
I have been playing with Twisted 12.2.0, and encountered this minor
infelicity:

1) Files not at the root of the web server work as expected:

a) putChild("foo", File("some-directory")) works as expected - URL is
http://example.com/foo/

b) Navigating to the directory "bar" within "foo" gives a URL of
http://example.com/foo/bar/ as expected.


2) Files at the root of the web server wind up with an extra "/" in the URL:

a)  putChild("", File("some-directory")) yields a URL of
http://example.com//   <-- note double slash

b) navigating to the same directory "bar" gives: http://example.com//bar
<-- double-slash again...

Conclusion:

I think it would make sense to special the case of the root directory and
not output a double "//" in the URL.

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.