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

Compute host header correctly #63

Merged
merged 1 commit into from Jan 20, 2023
Merged

Compute host header correctly #63

merged 1 commit into from Jan 20, 2023

Commits on Jan 20, 2023

  1. Compute host header correctly

    Signatures need to include the host header, but the requests library
    does not include it in prepared requests by default. Rather, it trusts
    that Python's HTTP client will compute and inject it when sending the
    request. This forces requests-aws4auth to compute how this header will
    look like.
    
    A slight discrepancy between the implementations is that the code in
    this library unconditionally skips the port, whereas the request ending
    up being sent will include a port if it does not match the URL scheme's
    default.
    
    This change adjusts the implementations to match in that regard.
    
    Fixes tedder#34
    phillipberndt committed Jan 20, 2023
    Copy the full SHA
    8390d23 View commit details
    Browse the repository at this point in the history