KeyError with non-existent repositories (hgwebdir.cgi)

Maxim Khitrov mkhitrov at gmail.com
Sat Jul 14 14:27:30 CDT 2007


Hello,

I'm trying to configure hgwebdir.cgi script to serve a few of my
repositories via Lighttpd. I'm using rewrite rules to send all
requests to the cgi script, and the whole thing works great for the
repositories that are there.

My question is about requests for non-existent directories. If I try
to access some random path that does not point to a valid repository,
I get a KeyError message with a ton of output containing the call
trace. My problem with this is that it exposes all the relevant paths
on the server. Where hgwebdir.cgi is running from, where python is
installed, and so on. I'm curious to know if there is some way to
suppress this output? For example, just send a 404 error instead.

If nothing like that exists right now, perhaps it is something worth
adding as a configuration option to hgweb.config?

Would appreciate any help on this.
Thanks.


More information about the Mercurial mailing list