Skip to content

requests library throws InvalidHeader because 'Content-Length' is int #15

Description

@PaulosV

Couple of months ago, we started seeing this exception in our logs:

InvalidHeader("Header value 556 must be of type str or bytes, not <type 'int'>",)

Turns out it's the Content-Length header in __init__, which is int; it should be converted to type str.

PR which fixes the issue is ready to merge: #14.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions