Browse Source

Merge pull request #1503 from LadyMozzarella/patch-db-http-response-test

Fix bug in checking for headers
Brittany Mazza 10 years ago
parent
commit
48fcacfefc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      toolset/benchmark/test_types/json_type.py

+ 2 - 2
toolset/benchmark/test_types/json_type.py

@@ -45,8 +45,8 @@ class JsonTestType(FrameworkTestType):
       return [('fail',"Expected message of 'hello, world!', got '%s'"%response['message'], url)]
       return [('fail',"Expected message of 'hello, world!', got '%s'"%response['message'], url)]
 
 
     # Ensure required response headers are present
     # Ensure required response headers are present
-    if any(v.lower() not in full_response for v in ('Server','Date','Content-Type: application/json')) \
-       or all(v.lower() not in full_response for v in ('Content-Length','Transfer-Encoding')):
+    if any(v.lower() not in full_response.lower() for v in ('Server','Date','Content-Type: application/json')) \
+       or all(v.lower() not in full_response.lower() for v in ('Content-Length','Transfer-Encoding')):
       return [('warn','Required response header missing.',url)]
       return [('warn','Required response header missing.',url)]
 
 
     return [('pass','',url)]
     return [('pass','',url)]