Fix two small bugs that would've prevented the web interface and IPv6
authorEric Hopper <hopper@omnifarious.org>
Tue, 27 Jun 2006 00:09:35 -0700
changeset 2507 7e01da2bc7f3
parent 2506 d0db3462d568
child 2508 ab460a3f0e3a
Fix two small bugs that would've prevented the web interface and IPv6 from working.
mercurial/hgweb/request.py
mercurial/hgweb/server.py
--- 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)