comparison mercurial/hgweb/hgweb_mod.py @ 5930:c301f15c965a

send conservatively capitalized HTTP headers
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 23 Jan 2008 14:28:25 +0100
parents 3340aa5a64f7
children 0011316fbe0e
comparison
equal deleted inserted replaced
5929:e160f2312815 5930:c301f15c965a
842 arch_version = key 842 arch_version = key
843 if cnode == key or key == 'tip': 843 if cnode == key or key == 'tip':
844 arch_version = short(cnode) 844 arch_version = short(cnode)
845 name = "%s-%s" % (reponame, arch_version) 845 name = "%s-%s" % (reponame, arch_version)
846 mimetype, artype, extension, encoding = self.archive_specs[type_] 846 mimetype, artype, extension, encoding = self.archive_specs[type_]
847 headers = [('Content-type', mimetype), 847 headers = [
848 ('Content-disposition', 'attachment; filename=%s%s' % 848 ('Content-Type', mimetype),
849 (name, extension))] 849 ('Content-Disposition', 'attachment; filename=%s%s' %
850 (name, extension))
851 ]
850 if encoding: 852 if encoding:
851 headers.append(('Content-encoding', encoding)) 853 headers.append(('Content-Encoding', encoding))
852 req.header(headers) 854 req.header(headers)
853 archival.archive(self.repo, req, cnode, artype, prefix=name) 855 archival.archive(self.repo, req, cnode, artype, prefix=name)
854 856
855 # add tags to things 857 # add tags to things
856 # tags -> list of changesets corresponding to tags 858 # tags -> list of changesets corresponding to tags