mercurial/hgweb/hgweb_mod.py
changeset 26211 ea489d94e1dc
parent 26210 7c759f1a056f
child 26217 0d0a0837895d
equal deleted inserted replaced
26210:7c759f1a056f 26211:ea489d94e1dc
   396                 caching(self, req) # sets ETag header or raises NOT_MODIFIED
   396                 caching(self, req) # sets ETag header or raises NOT_MODIFIED
   397             if cmd not in webcommands.__all__:
   397             if cmd not in webcommands.__all__:
   398                 msg = 'no such method: %s' % cmd
   398                 msg = 'no such method: %s' % cmd
   399                 raise ErrorResponse(HTTP_BAD_REQUEST, msg)
   399                 raise ErrorResponse(HTTP_BAD_REQUEST, msg)
   400             elif cmd == 'file' and 'raw' in req.form.get('style', []):
   400             elif cmd == 'file' and 'raw' in req.form.get('style', []):
   401                 self.ctype = ctype
   401                 # TODO convert to regular assignment once app proxy is removed.
       
   402                 object.__setattr__(rctx, 'ctype', ctype)
   402                 content = webcommands.rawfile(rctx, req, tmpl)
   403                 content = webcommands.rawfile(rctx, req, tmpl)
   403             else:
   404             else:
   404                 content = getattr(webcommands, cmd)(rctx, req, tmpl)
   405                 content = getattr(webcommands, cmd)(rctx, req, tmpl)
   405                 req.respond(HTTP_OK, ctype)
   406                 req.respond(HTTP_OK, ctype)
   406 
   407