Show More
@@ -689,7 +689,14 b' class hgweb:' | |||||
689 | mff = self.repo.manifest.readflags(mnode) |
|
689 | mff = self.repo.manifest.readflags(mnode) | |
690 | mtime = int(time.time()) |
|
690 | mtime = int(time.time()) | |
691 |
|
691 | |||
692 | req.httphdr('application/octet-stream', name[:-1] + '.tar.' + type) |
|
692 | if type == "gz": | |
|
693 | encoding = "gzip" | |||
|
694 | else: | |||
|
695 | encoding = "x-bzip2" | |||
|
696 | req.header([('Content-type', 'application/x-tar'), | |||
|
697 | ('Content-disposition', 'attachment; filename=%s%s%s' % | |||
|
698 | (name[:-1], '.tar.', type)), | |||
|
699 | ('Content-encoding', encoding)]) | |||
693 | for fname in files: |
|
700 | for fname in files: | |
694 | rcont = self.repo.file(fname).read(mf[fname]) |
|
701 | rcont = self.repo.file(fname).read(mf[fname]) | |
695 | finfo = tarfile.TarInfo(name + fname) |
|
702 | finfo = tarfile.TarInfo(name + fname) |
General Comments 0
You need to be logged in to leave comments.
Login now