• Tim Burke's avatar
    py3: Be able to read and write non-ASCII headers · 76fde892
    Tim Burke authored
    Apparently Python's stdlib got more picky about what a header should
    look like. As a result, if an account, container, or object had a
    non-ASCII metadata name (values were fine), the proxy-server wouldn't
    parse all of the headers. See https://bugs.python.org/issue37093 for
    more information.
    
    This presented several problems:
    - Since the non-ASCII header aborts parsing, we may lose important
      HTTP-level information like Content-Length or Transfer-Encoding.
    - Since the offending header wouldn't get parsed, the client wouldn't
      even know what the problem was.
    - Even if the client knew what the bad header was, it would have no way
      to clear it, as the server uses the same logic to parse incoming
      requests.
    
    So, hack in our own header parsing if we detect that parsing was
    aborted. Note that we also have to mangle bufferedhttp's putheader so we
    can get non-ASCII headers to the backend servers.
    
    Now, we can run the test_unicode_metadata tests in
    test/functional/test_account.py and test/functional/test_container.py
    under py2 against services running under py3.
    
    Change-Id: I0f03c211f35a9a49e047a5718a9907b515ca88d7
    76fde892
Name
Last commit
Last update
api-ref/source Loading commit data...
bin Loading commit data...
doc Loading commit data...
docker Loading commit data...
etc Loading commit data...
examples Loading commit data...
releasenotes Loading commit data...
swift Loading commit data...
test Loading commit data...
tools Loading commit data...
.alltests Loading commit data...
.coveragerc Loading commit data...
.dockerignore Loading commit data...
.functests Loading commit data...
.gitignore Loading commit data...
.gitreview Loading commit data...
.mailmap Loading commit data...
.manpages Loading commit data...
.probetests Loading commit data...
.testr.conf Loading commit data...
.unittests Loading commit data...
.zuul.yaml Loading commit data...
AUTHORS Loading commit data...
CHANGELOG Loading commit data...
CONTRIBUTING.rst Loading commit data...
Dockerfile Loading commit data...
LICENSE Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
REVIEW_GUIDELINES.rst Loading commit data...
babel.cfg Loading commit data...
bandit.yaml Loading commit data...
bindep.txt Loading commit data...
lower-constraints.txt Loading commit data...
requirements.txt Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...
test-requirements.txt Loading commit data...
tox.ini Loading commit data...