Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Sun, 07 Jun 2009 19:23:23 +0200
changeset 568 060df226baff
parent 564 1ce04b8decf2 (current diff)
parent 567 fd52c78e1aa7 (diff)
child 569 cd5da00e93cd
Merge with stable
--- a/tests/get-with-headers.py	Sun Jun 07 19:16:14 2009 +0200
+++ b/tests/get-with-headers.py	Sun Jun 07 19:23:23 2009 +0200
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 
-__doc__ = """This does HTTP get requests given a host:port and path and returns
+"""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)