changeset 2507:7e01da2bc7f3

Fix two small bugs that would've prevented the web interface and IPv6 from working.
author Eric Hopper <hopper@omnifarious.org>
date Tue, 27 Jun 2006 00:09:35 -0700
parents d0db3462d568
children ab460a3f0e3a
files mercurial/hgweb/request.py mercurial/hgweb/server.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/request.py	Tue Jun 27 00:09:33 2006 -0700
+++ b/mercurial/hgweb/request.py	Tue Jun 27 00:09:35 2006 -0700
@@ -59,7 +59,7 @@
     def write(self, *things):
         if self.server_write is None:
             if not self.headers:
-                raise RuntimeError("request.write called before headers sent.")
+                self.header()
             self.server_write = self.start_response('200 Script output follows',
                                                     self.headers)
             self.start_response = None
--- a/mercurial/hgweb/server.py	Tue Jun 27 00:09:33 2006 -0700
+++ b/mercurial/hgweb/server.py	Tue Jun 27 00:09:35 2006 -0700
@@ -196,7 +196,7 @@
         def __init__(self, *args, **kwargs):
             if self.address_family is None:
                 raise hg.RepoError(_('IPv6 not available on this system'))
-            super(IPv6HTTPServer, self).__init__(*args, **kargs)
+            super(IPv6HTTPServer, self).__init__(*args, **kwargs)
 
     if use_ipv6:
         return IPv6HTTPServer((address, port), _hgwebhandler)