Skip to content

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

@PaulosV

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.

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