Show More
@@ -129,7 +129,7 b' def staticfile(directory, fname, req):' | |||
|
129 | 129 | for part in parts: |
|
130 | 130 | if (part in ('', os.curdir, os.pardir) or |
|
131 | 131 | os.sep in part or os.altsep is not None and os.altsep in part): |
|
132 |
return |
|
|
132 | return | |
|
133 | 133 | fpath = os.path.join(*parts) |
|
134 | 134 | if isinstance(directory, str): |
|
135 | 135 | directory = [directory] |
@@ -144,7 +144,6 b' def staticfile(directory, fname, req):' | |||
|
144 | 144 | data = fp.read() |
|
145 | 145 | fp.close() |
|
146 | 146 | req.respond(HTTP_OK, ct, body=data) |
|
147 | return "" | |
|
148 | 147 | except TypeError: |
|
149 | 148 | raise ErrorResponse(HTTP_SERVER_ERROR, 'illegal filename') |
|
150 | 149 | except OSError, err: |
@@ -197,7 +197,8 b' class hgwebdir(object):' | |||
|
197 | 197 | if isinstance(tp, str): |
|
198 | 198 | tp = [tp] |
|
199 | 199 | static = [os.path.join(p, 'static') for p in tp] |
|
200 |
|
|
|
200 | staticfile(static, fname, req) | |
|
201 | return [] | |
|
201 | 202 | |
|
202 | 203 | # top-level index |
|
203 | 204 | elif not virtual: |
General Comments 0
You need to be logged in to leave comments.
Login now