Skip to content

Client superfluously adding a trailing forward slash when provided with an empty path #2673

Description

@Mardoxx

https://www.rfc-editor.org/rfc/rfc3986#section-3
and
https://www.rfc-editor.org/rfc/rfc3986#section-3.3

Are http://base and http://base/ two distinct URLs? If so, so why does this is behaviour exist?

>>> from httpx import Client
>>> Client().build_request("GET",  "")
<Request('GET', '/')>
>>> Client().build_request("GET",  "/")
<Request('GET', '/')>
>>> 

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions