hgweb: ignore pipe errors
authormpm@selenic.com
Tue, 07 Jun 2005 00:21:53 -0800
changeset 271 35acefbf0ae6
parent 270 5a80ed2158c8
child 272 467cea2bf2d8
hgweb: ignore pipe errors -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hgweb: ignore pipe errors manifest hash: 3a3baaa175a422bf499f414b5186ed551827db56 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCpVkhywK+sNU5EO8RAo5aAJ9KPR/Gwp8YBswhyKqzVYVlgBl49ACghr65 sGKxB7ctoX9XB1WDht8WUzk= =J2bp -----END PGP SIGNATURE-----
mercurial/hgweb.py
--- a/mercurial/hgweb.py	Tue Jun 07 00:07:31 2005 -0800
+++ b/mercurial/hgweb.py	Tue Jun 07 00:21:53 2005 -0800
@@ -662,10 +662,13 @@
 
     class hgwebhandler(BaseHTTPServer.BaseHTTPRequestHandler):
         def do_POST(self):
-            self.do_hgweb()
+            try:
+                self.do_hgweb()
+            except socket.error, inst:
+                if inst.args[0] != 32: raise
 
         def do_GET(self):
-            self.do_hgweb()
+            self.do_POST()
 
         def do_hgweb(self):
             query = ""