I have been playing with Twisted 12.2.0, and encountered this minor infelicity:<br><br>1) Files not at the root of the web server work as expected:<br><br>a) putChild("foo", File("some-directory")) works as expected - URL is <a href="http://example.com/foo/">http://example.com/foo/</a><br>
<br>b) Navigating to the directory "bar" within "foo" gives a URL of <a href="http://example.com/foo/bar/">http://example.com/foo/bar/</a> as expected.<br><br><br>2) Files at the root of the web server wind up with an extra "/" in the URL:<br>
<br>a) putChild("", File("some-directory")) yields a URL of <a href="http://example.com//">http://example.com//</a> <-- note double slash<br><br>b) navigating to the same directory "bar" gives: <a href="http://example.com//bar">http://example.com//bar</a> <-- double-slash again...<br>
<br>Conclusion:<br><br>I think it would make sense to special the case of the root directory and not output a double "//" in the URL.<br>