Allow Connection: value to be case-insensitive

Proxies and LBs parse the Connection: header and re-insert
the value with random casing. This occurs when we run functional
tests against realistic clusters.

Change-Id: Icb0d3e3708949127e9750f2022de8c74ce51ebe9
This commit is contained in:
Pete Zaitcev 2019-08-09 15:06:47 -05:00
parent 8d3d21e668
commit c90365f98d
1 changed files with 4 additions and 0 deletions

View File

@ -1290,6 +1290,10 @@ class TestFile(Base):
if not matches:
errors.append('Missing expected header %s' % k)
for (got_k, got_v) in matches:
# The Connection: header is parsed by cluster's LB and may
# be returned in either original lowercase or camel-cased.
if k == 'connection':
got_v = got_v.lower()
if got_v != v:
errors.append('Expected %s but got %s for %s' %
(v, got_v, k))