Show More
@@ -657,6 +657,12 b' class hgweb(object):' | |||||
657 | req.header(msg.items()) |
|
657 | req.header(msg.items()) | |
658 | yield header_file.read() |
|
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 | def footer(**map): |
|
666 | def footer(**map): | |
661 | yield self.t("footer", |
|
667 | yield self.t("footer", | |
662 | motd=self.repo.ui.config("web", "motd", ""), |
|
668 | motd=self.repo.ui.config("web", "motd", ""), | |
@@ -714,6 +720,7 b' class hgweb(object):' | |||||
714 | "repo": self.reponame, |
|
720 | "repo": self.reponame, | |
715 | "header": header, |
|
721 | "header": header, | |
716 | "footer": footer, |
|
722 | "footer": footer, | |
|
723 | "rawfileheader": rawfileheader, | |||
717 | }) |
|
724 | }) | |
718 |
|
725 | |||
719 | if not req.form.has_key('cmd'): |
|
726 | if not req.form.has_key('cmd'): |
@@ -8,7 +8,7 b" diffline = '#line#'" | |||||
8 | changesetparent = '# parent: #node#' |
|
8 | changesetparent = '# parent: #node#' | |
9 | changesetchild = '# child: #node#' |
|
9 | changesetchild = '# child: #node#' | |
10 | filenodelink = '' |
|
10 | filenodelink = '' | |
11 | filerevision = 'Content-Type: #mimetype#\nContent-Disposition: filename=#file#\n\n#raw#' |
|
11 | filerevision = '#rawfileheader##raw#' | |
12 | fileline = '#line#' |
|
12 | fileline = '#line#' | |
13 | diffblock = '#lines#' |
|
13 | diffblock = '#lines#' | |
14 | filediff = filediff-raw.tmpl |
|
14 | filediff = filediff-raw.tmpl |
General Comments 0
You need to be logged in to leave comments.
Login now