hgweb: return meaningful HTTP status codes instead of nonsense stable
authorBryan O'Sullivan <bos@serpentine.com>
Wed, 28 Nov 2007 08:38:42 -0800
branchstable
changeset 514 06b69a53ab0f
parent 513 90b51a0fe1f0
child 515 9ea5ac3258b6
hgweb: return meaningful HTTP status codes instead of nonsense [ original upstream description ]
tests/get-with-headers.py
--- a/tests/get-with-headers.py	Thu Jun 29 16:44:23 2006 -0700
+++ b/tests/get-with-headers.py	Wed Nov 28 08:38:42 2007 -0800
@@ -14,3 +14,7 @@
         print "%s: %s" % (h, response.getheader(h))
 print
 sys.stdout.write(response.read())
+
+if 200 <= response.status <= 299:
+    sys.exit(0)
+sys.exit(1)