Skip to content

Parser of the Forwarded header ignores the port number #3009

Closed
@gjcarneiro

Description

Long story short

Parser of the Forwarded header ignores the port number.

Expected behaviour

Parsing the header Forwarded: for=1.2.3.4:5678 should yield a request.forwarded value of ({"for": "1.2.3.4:5678"},).

Actual behaviour

Parsing the header Forwarded: for=1.2.3.4:5678 gives me request.forwarded value of ({"for": "1.2.3.4"},). That is, it removes the client port number.

Your environment

aiohttp 3.2.1 / Python 3.6.5.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions