equal
deleted
inserted
replaced
32 hg, |
32 hg, |
33 profiling, |
33 profiling, |
34 pycompat, |
34 pycompat, |
35 scmutil, |
35 scmutil, |
36 templater, |
36 templater, |
|
37 templateutil, |
37 ui as uimod, |
38 ui as uimod, |
38 util, |
39 util, |
39 ) |
40 ) |
40 |
41 |
41 from . import ( |
42 from . import ( |
368 res.headers['Content-Security-Policy'] = csp |
369 res.headers['Content-Security-Policy'] = csp |
369 |
370 |
370 virtual = req.dispatchpath.strip('/') |
371 virtual = req.dispatchpath.strip('/') |
371 tmpl = self.templater(req, nonce) |
372 tmpl = self.templater(req, nonce) |
372 ctype = tmpl('mimetype', encoding=encoding.encoding) |
373 ctype = tmpl('mimetype', encoding=encoding.encoding) |
373 ctype = templater.stringify(ctype) |
374 ctype = templateutil.stringify(ctype) |
374 |
375 |
375 # Global defaults. These can be overridden by any handler. |
376 # Global defaults. These can be overridden by any handler. |
376 res.status = '200 Script output follows' |
377 res.status = '200 Script output follows' |
377 res.headers['Content-Type'] = ctype |
378 res.headers['Content-Type'] = ctype |
378 |
379 |