tests/get-with-headers.py
branchstable
changeset 1199 b9f44c378e62
parent 1106 a02b1025536c
child 1200 1a67e2797f33
--- a/tests/get-with-headers.py	Wed Jan 16 00:09:26 2013 +0100
+++ b/tests/get-with-headers.py	Tue Jan 15 20:54:57 2013 +0100
@@ -31,6 +31,8 @@
     conn.request("GET", '/' + path, None, headers)
     response = conn.getresponse()
     print response.status, reasons.get(response.reason, response.reason)
+    if show[:1] == ['-']:
+        show = [h for h, v in response.getheaders() if h.lower() not in show]
     for h in [h.lower() for h in show]:
         if response.getheader(h, None) is not None:
             print "%s: %s" % (h, response.getheader(h))