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

urlapi: add CURLU_GET_EMPTY for empty queries and fragments #13396

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Apr 17, 2024

By default the API inhibits empty queries and fragments extracted. Unless this new flag is set.

This also makes the behavior more consistent: without it set, zero length queries and fragments are considered not present in the URL. With the flag set, they are returned as a zero length strings if they were in fact present in the URL.

This applies when extracting the individual query and fragment components and for the full URL.

@bagder
Copy link
Member Author

bagder commented Apr 17, 2024

We could possibly change this to be on by default, but I'm a little scared how such a behavior change could surprise users.

We could also possibly consider adding two separate flags for this, but I figured users are more likely to want consistent behavior in either direction for both components.

By default the API inhibits empty queries and fragments extracted.
Unless this new flag is set.

This also makes the behavior more consistent: without it set, zero
length queries and fragments are considered not present in the URL. With
the flag set, they are returned as a zero length strings if they were in
fact present in the URL.

This applies when extracting the individual query and fragment
components and for the full URL.

Closes #13396
@bagder bagder closed this in 3eac21d Apr 18, 2024
@bagder bagder deleted the bagder/urlapi-get_empty branch April 18, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant