This is a backport of fix for CVE-2016-5699 from Python 3.4 to 3.3, from upstream. The issue is explained in this PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210539
Upstream patch for 3.4 is here: https://hg.python.org/cpython/rev/bf3e1c9b80e9
Modifications that were required to have it run on 3.3 were minimal:
- lang/python33/files/patch-Lib_http_client.py: re.fullmatch() does not exist, so re.match is used with anchors
- lang/python33/files/patch-Lib_test_test__httplib.py: in test_invalid_headers() , TestCase.subTest() was thrown out in favor of simple asserts (if one fails, whole test fails)
- NEWS item was not backported