mercurial/hgweb/hgweb_mod.py
changeset 36872 89002d07a114
parent 36871 9fc3d814646e
child 36876 97f44b0720e2
equal deleted inserted replaced
36871:9fc3d814646e 36872:89002d07a114
   397                 res.headers['ETag'] = tag
   397                 res.headers['ETag'] = tag
   398 
   398 
   399             if cmd not in webcommands.__all__:
   399             if cmd not in webcommands.__all__:
   400                 msg = 'no such method: %s' % cmd
   400                 msg = 'no such method: %s' % cmd
   401                 raise ErrorResponse(HTTP_BAD_REQUEST, msg)
   401                 raise ErrorResponse(HTTP_BAD_REQUEST, msg)
   402             elif cmd == 'file' and req.qsparams.get('style') == 'raw':
       
   403                 res.status = '200 Script output follows'
       
   404                 res.headers['Content-Type'] = ctype
       
   405                 content = webcommands.rawfile(rctx, wsgireq, tmpl)
       
   406                 assert content is res
       
   407                 return res.sendresponse()
       
   408             else:
   402             else:
   409                 # Set some globals appropriate for web handlers. Commands can
   403                 # Set some globals appropriate for web handlers. Commands can
   410                 # override easily enough.
   404                 # override easily enough.
   411                 res.status = '200 Script output follows'
   405                 res.status = '200 Script output follows'
   412                 res.headers['Content-Type'] = ctype
   406                 res.headers['Content-Type'] = ctype