[Bug 3809] New: Visiting a path without template map entry causes traceback, should 404

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Tue Feb 5 04:14:57 CST 2013


http://bz.selenic.com/show_bug.cgi?id=3809

          Priority: normal
            Bug ID: 3809
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Visiting a path without template map entry causes
                    traceback, should 404
          Severity: bug
    Classification: Unclassified
                OS: Mac OS
          Reporter: kbullock+mercurial at ringworld.org
          Hardware: Macintosh
            Status: UNCONFIRMED
           Version: 2.5
         Component: hgweb
           Product: Mercurial

Noticed this when investigating bug #3783 on a local 'hg serve':

127.0.0.1 - - [05/Feb/2013 09:11:36] Exception happened during processing
request '/summary':
Traceback (most recent call last):
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/hgweb/server.py", line
77, in do_POST
    self.do_write()
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/hgweb/server.py", line
70, in do_write
    self.do_hgweb()
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/hgweb/server.py", line
137, in do_hgweb
    for chunk in self.server.application(env, self._start_response):
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/hgweb/hgweb_mod.py",
line 129, in __call__
    return self.run_wsgi(req)
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/hgweb/hgweb_mod.py",
line 240, in run_wsgi
    content = getattr(webcommands, cmd)(self, req, tmpl)
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/hgweb/webcommands.py",
line 556, in summary
    archives=web.archivelist("tip"))
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/templater.py", line
431, in __call__
    stream = proc.process(t, mapping)
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/templater.py", line
364, in process
    return _flatten(runtemplate(self, mapping, self._load(t)))
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/templater.py", line
357, in _load
    self._cache[t] = compiletemplate(self._loader(t), self)
  File "/Users/kbullock/Source/Projects/hg/hg/mercurial/templater.py", line
418, in load
    raise util.Abort(_('"%s" not in template map') % inst.args[0])
Abort: "summary" not in template map

We should be issuing a 404 for templates that don't exist in the current theme.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list