##// END OF EJS Templates
Fix raw files in the web UI.
Eric Hopper -
r2534:d5a3cc65 default
parent child Browse files
Show More
@@ -657,6 +657,12 b' class hgweb(object):'
657 657 req.header(msg.items())
658 658 yield header_file.read()
659 659
660 def rawfileheader(**map):
661 req.header([('Content-type', map['mimetype']),
662 ('Content-disposition', 'filename=%s' % map['file']),
663 ('Content-length', str(len(map['raw'])))])
664 yield ''
665
660 666 def footer(**map):
661 667 yield self.t("footer",
662 668 motd=self.repo.ui.config("web", "motd", ""),
@@ -714,6 +720,7 b' class hgweb(object):'
714 720 "repo": self.reponame,
715 721 "header": header,
716 722 "footer": footer,
723 "rawfileheader": rawfileheader,
717 724 })
718 725
719 726 if not req.form.has_key('cmd'):
@@ -8,7 +8,7 b" diffline = '#line#'"
8 8 changesetparent = '# parent: #node#'
9 9 changesetchild = '# child: #node#'
10 10 filenodelink = ''
11 filerevision = 'Content-Type: #mimetype#\nContent-Disposition: filename=#file#\n\n#raw#'
11 filerevision = '#rawfileheader##raw#'
12 12 fileline = '#line#'
13 13 diffblock = '#lines#'
14 14 filediff = filediff-raw.tmpl
General Comments 0
You need to be logged in to leave comments. Login now