Skip to content

Test regression with pycurl 7.47.0: test_strip_headers_on_redirect; Authorization header is not stripped #3674

Description

@mgorny

Reproduced on 3239945 and with 6.5.7.

$ tox -e py314-full
py314-full: install_deps> python -I -m pip install 'pycares<5' pycurl twisted
.pkg: install_requires> python -I -m pip install setuptools
.pkg: _optional_hooks> python /usr/lib/python3.14/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /usr/lib/python3.14/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /usr/lib/python3.14/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: prepare_metadata_for_build_wheel> python /usr/lib/python3.14/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /usr/lib/python3.14/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py314-full: install_package> python -I -m pip install --force-reinstall --no-deps /tmp/tornado/.tox/.tmp/package/1/tornado-6.6.dev1.tar.gz
py314-full: commands[0] /tmp/tornado/.tox> python -bb -m tornado.test
........................................................................................................F.............................................................................................................................................................................................................................................................................................................................s.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................s...........s..................................................................................................s.......................................................................................................................................................................................................
======================================================================
FAIL: test_strip_headers_on_redirect (tornado.test.curl_httpclient_test.CurlHTTPClientCommonTestCase.test_strip_headers_on_redirect) (name='credentials in URL', origin='different')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/tornado/.tox/py314-full/lib/python3.14/site-packages/tornado/test/httpclient_test.py", line 795, in test_strip_headers_on_redirect
    self.assertNotIn("Authorization", echoed_headers)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Authorization' unexpectedly found in {'Host': '127.0.0.1:46865', 'Authorization': 'Basic bWU6c2VjcmV0', 'User-Agent': 'Mozilla/5.0 (compatible; pycurl)', 'Accept': '*/*', 'Accept-Encoding': 'gzip,deflate'}

----------------------------------------------------------------------
Ran 1243 tests in 25.849s

FAILED (failures=1, skipped=4)
Some tests were skipped because: implicit event loop creation not
available, needs fix, no testable future imports, py312 has its own
check for test case returns
py314-full: exit 1 (26.16 seconds) /tmp/tornado/.tox> python -bb -m tornado.test pid=1240646
  py314-full: FAIL code 1 (40.07=setup[13.91]+cmd[26.16] seconds)
  evaluation failed :( (40.15 seconds)

FWICS it's passing with pycurl 7.46.0 but failing with 7.47.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions