Skip to content
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

ignore URI fragment when dereferencing #1514

Merged
merged 1 commit into from Jul 1, 2016

Conversation

Tobion
Copy link
Member

@Tobion Tobion commented Jul 1, 2016

The URI fragment should be ignored when dereferencing a URI and is not meant to be sent.

Fragment identifiers have a special role in information retrieval
systems as the primary form of client-side indirect referencing,
allowing an author to specifically identify aspects of an existing
resource that are only indirectly provided by the resource owner. 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
.

https://tools.ietf.org/html/rfc3986#section-3.5

@@ -495,12 +495,14 @@ private static function retryFailedRewind(

private function createHeaderFn(EasyHandle $easy)
{
if (!isset($easy->options['on_headers'])) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This was only rewritten so phpstorm understands that $onHeaders can be a callable or null and does not mark this with an error.

@mtdowling mtdowling merged commit 71960d8 into guzzle:master Jul 1, 2016
@Tobion Tobion deleted the ignore-fragment branch July 1, 2016 21:34
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.

None yet

2 participants