mercurial/hgweb/request.py
changeset 6136 acfb9fa494e2
parent 5993 948a41e77902
child 6137 1c0e7afe824a
equal deleted inserted replaced
6135:be91a77b7f18 6136:acfb9fa494e2
    83     def httphdr(self, type=None, filename=None, length=0, headers={}):
    83     def httphdr(self, type=None, filename=None, length=0, headers={}):
    84         headers = headers.items()
    84         headers = headers.items()
    85         if type is not None:
    85         if type is not None:
    86             headers.append(('Content-Type', type))
    86             headers.append(('Content-Type', type))
    87         if filename:
    87         if filename:
    88             headers.append(('Content-Disposition', 'inline; filename=%s' %
    88             headers.append(('Content-Disposition',
    89                             filename))
    89                             'inline; filename=%s' % filename.split('/')[-1]))
    90         if length:
    90         if length:
    91             headers.append(('Content-Length', str(length)))
    91             headers.append(('Content-Length', str(length)))
    92         self.header(headers)
    92         self.header(headers)
    93 
    93 
    94 def wsgiapplication(app_maker):
    94 def wsgiapplication(app_maker):