tests/get-with-headers.py
branchstable
changeset 566 986012d03ed3
parent 515 9ea5ac3258b6
child 567 fd52c78e1aa7
--- a/tests/get-with-headers.py	Sun Jun 07 19:18:59 2009 +0200
+++ b/tests/get-with-headers.py	Thu Dec 25 17:49:08 2008 +0100
@@ -3,7 +3,7 @@
 __doc__ = """This does HTTP get requests given a host:port and path and returns
 a subset of the headers plus the body of the result."""
 
-import httplib, sys
+import httplib, sys, re
 
 try:
     import msvcrt, os
@@ -21,7 +21,9 @@
     if response.getheader(h, None) is not None:
         print "%s: %s" % (h, response.getheader(h))
 print
-sys.stdout.write(response.read())
+data = response.read()
+data = re.sub('\d+ years', 'many years', data)
+sys.stdout.write(data)
 
 if 200 <= response.status <= 299:
     sys.exit(0)