Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wptserve] Rework header encoding/decoding in Request #13246

Merged
merged 3 commits into from
Oct 9, 2018

Commits on Oct 9, 2018

  1. Configuration menu
    Copy the full SHA
    4f93832 View commit details
    Browse the repository at this point in the history
  2. Add a Unicode smoke test to wptserve

    The test sends a request to wptserve with non-ASCII characters in a
    header and sets up a simple handler to return the value of that header.
    The server shouldn't crash in either Python 2 or 3, and the response
    should not be garbled. The server crashes in Python 2 (#13204).
    Hexcles committed Oct 9, 2018
    Configuration menu
    Copy the full SHA
    cb0d7da View commit details
    Browse the repository at this point in the history
  3. Rework encode/decode of headers in Request

    This change changes the encoding/decoding of headers in Request and
    username/password in Authentication: now all keys and values have binary
    type (because of an implementation detail in the Python 3 standard
    library, we actually need to re-encode the headers back to bytes in
    Python 3).
    
    Documentation and comments are also improved to clarify the encoding
    situation. Also add test cases for non-ASCII characters in auth headers.
    Hexcles committed Oct 9, 2018
    Configuration menu
    Copy the full SHA
    887214f View commit details
    Browse the repository at this point in the history