Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgwebdir_mod.py @ 7560:305efd897a63
hgwebdir_mod: fix a performance issue with static files
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 03 Jan 2009 01:00:46 +0100 |
parents | e60aaae83323 |
children | 3ccaefc84f45 |
comparison
equal
deleted
inserted
replaced
7556:f03562400824 | 7560:305efd897a63 |
---|---|
128 if virtual.startswith('static/'): | 128 if virtual.startswith('static/'): |
129 fname = virtual[7:] | 129 fname = virtual[7:] |
130 else: | 130 else: |
131 fname = req.form['static'][0] | 131 fname = req.form['static'][0] |
132 static = templater.templatepath('static') | 132 static = templater.templatepath('static') |
133 return staticfile(static, fname, req) | 133 return (staticfile(static, fname, req),) |
134 | 134 |
135 # top-level index | 135 # top-level index |
136 elif not virtual: | 136 elif not virtual: |
137 req.respond(HTTP_OK, ctype) | 137 req.respond(HTTP_OK, ctype) |
138 return self.makeindex(req, tmpl) | 138 return self.makeindex(req, tmpl) |