diff --git a/dumptest.py b/dumptest.py index 23edb569b1385709a36560e892e15484ba30a5ca..b294db3c5d14ea1ea5a1df95c066af717a0addae 100644 --- a/dumptest.py +++ b/dumptest.py @@ -9,6 +9,7 @@ BASE_URL = 'http://localhost:8080' errors = defaultdict(set) urls = {'/'} +seen = set() while urls: try: http_conn.close() @@ -16,6 +17,9 @@ while urls: pass http_conn = httplib.HTTPConnection('localhost', 8080) url = urls.pop() + if url in seen: + continue + seen.add(url) print 'Requesting %r...' % url http_conn.request('GET', BASE_URL + url) response = http_conn.getresponse()