mercurial/hgweb/hgweb_mod.py
changeset 4690 ecea4de3104e
parent 4669 96e096fe9e86
child 4778 e21a0e12ff10
equal deleted inserted replaced
4689:54a2b94a372c 4690:ecea4de3104e
   101             self.maxchanges = int(self.config("web", "maxchanges", 10))
   101             self.maxchanges = int(self.config("web", "maxchanges", 10))
   102             self.stripecount = int(self.config("web", "stripes", 1))
   102             self.stripecount = int(self.config("web", "stripes", 1))
   103             self.maxshortchanges = int(self.config("web", "maxshortchanges", 60))
   103             self.maxshortchanges = int(self.config("web", "maxshortchanges", 60))
   104             self.maxfiles = int(self.config("web", "maxfiles", 10))
   104             self.maxfiles = int(self.config("web", "maxfiles", 10))
   105             self.allowpull = self.configbool("web", "allowpull", True)
   105             self.allowpull = self.configbool("web", "allowpull", True)
       
   106             self.encoding = self.config("web", "encoding", util._encoding)
   106 
   107 
   107     def archivelist(self, nodeid):
   108     def archivelist(self, nodeid):
   108         allowed = self.configlist("web", "allow_archive")
   109         allowed = self.configlist("web", "allow_archive")
   109         for i, spec in self.archive_specs.iteritems():
   110         for i, spec in self.archive_specs.iteritems():
   110             if i in allowed or self.configbool("web", "allow" + i):
   111             if i in allowed or self.configbool("web", "allow" + i):
   653         wsgicgi.launch(wsgiapplication(make_web_app))
   654         wsgicgi.launch(wsgiapplication(make_web_app))
   654 
   655 
   655     def run_wsgi(self, req):
   656     def run_wsgi(self, req):
   656         def header(**map):
   657         def header(**map):
   657             header_file = cStringIO.StringIO(
   658             header_file = cStringIO.StringIO(
   658                 ''.join(self.t("header", encoding=util._encoding, **map)))
   659                 ''.join(self.t("header", encoding=self.encoding, **map)))
   659             msg = mimetools.Message(header_file, 0)
   660             msg = mimetools.Message(header_file, 0)
   660             req.header(msg.items())
   661             req.header(msg.items())
   661             yield header_file.read()
   662             yield header_file.read()
   662 
   663 
   663         def rawfileheader(**map):
   664         def rawfileheader(**map):