Skip to content

Client must not send fragment of URL #128

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

Merged

Conversation

kiron1
Copy link
Contributor

@kiron1 kiron1 commented Jul 18, 2020

The fragment part of an URL is purely for the client and is not expected to be sent to the client.

Referring RFC7230, and RFC3986. Excerpt below:

5.1. Identifying a Target Resource
[...] The target URI excludes the reference's fragment component, if any,
since fragment identifiers are reserved for client-side processing
([RFC3986], Section 3.5).

3.5. Fragment
[...] As such, the fragment identifier is not used in the
scheme-specific processing of a URI; instead, the fragment identifier is
separated from the rest of the URI prior to a dereference, and thus the
identifying information within the fragment itself is dereferenced solely
by the user agent, regardless of the URI scheme.

@kiron1 kiron1 closed this Jul 18, 2020
@kiron1 kiron1 reopened this Jul 18, 2020
Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this, fixing it, linking to the RFC, and including a test case! Much appreciated!

@yoshuawuyts yoshuawuyts merged commit 5606a9d into http-rs:master Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants