Author: tmckay
Date: 2011-04-18 18:07:25 +0000 (Mon, 18 Apr 2011)
New Revision: 4720
Modified:
branches/scale_testing/wooly/python/wooly/server.py
Log:
Put link logging stuff in an if block
Modified: branches/scale_testing/wooly/python/wooly/server.py
===================================================================
--- branches/scale_testing/wooly/python/wooly/server.py 2011-04-18 14:34:00 UTC (rev
4719)
+++ branches/scale_testing/wooly/python/wooly/server.py 2011-04-18 18:07:25 UTC (rev
4720)
@@ -139,16 +139,20 @@
headers = ()
content = ""
- #ccindex = -1
- #for cc in range(len(headers)):
- # if headers[cc][0] == "Cache-Control" and "max-age" in
headers[cc][1]:
- # ccindex = cc
+ # Link logging stuff for automated web testing.
+ if False:
+ # See if we have a cache-control header. In the automated testing we
+ # want to skip links that have cache-control on them aft
+ ccindex = -1
+ for cc in range(len(headers)):
+ if headers[cc][0] == "Cache-Control" and "max-age" in
headers[cc][1]:
+ ccindex = cc
- #ccPresent = ccindex != -1
- #self.log_link(env["REQUEST_URI"], self.get_last_requested(env) !=
None, ccPresent)
- ## Remove cache control for link logging so that we get the flag, but not the
behavior.
- #if ccPresent:
- # del headers[ccindex]
+ ccPresent = ccindex != -1
+ self.log_link(env["REQUEST_URI"], self.get_last_requested(env) !=
None, ccPresent)
+ #Remove cache control for link logging so that we get the flag, but not the
behavior.
+ if ccPresent:
+ del headers[ccindex]
response(status, headers)
Show replies by date