]> khamidou — GitHub mirrors - vcrpy.git/commit
Make request.headers always a CaseInsensitiveDict.
authorAron Griffis <aron@arongriffis.com>
Mon, 24 Aug 2015 16:58:34 +0000 (12:58 -0400)
committerAron Griffis <aron@arongriffis.com>
Mon, 24 Aug 2015 20:19:34 +0000 (16:19 -0400)
commiteda64bc3be52959eabe497b62c3662b6fd9d8d90
tree1fe2fb49d9d82e7950dffc8e953d21f0c4d31ce6
parentefe6744eda590f97ef5fb5a767b5c9232fb6c62a
Make request.headers always a CaseInsensitiveDict.

Previously request.headers was a normal dict (albeit with the
request.add_header interface) which meant that some code paths would do
case-sensitive matching, for example remove_post_data_parameters which
tests for 'Content-Type'. This change allows all code paths to get the same
case-insensitive treatment.

Additionally request.headers becomes a property to enforce upgrading it to
a CaseInsensitiveDict even if assigned.
tests/integration/test_filter.py
vcr/filters.py
vcr/matchers.py
vcr/request.py
vcr/stubs/tornado_stubs.py