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

Fix Query with no key parse #1066

Merged
merged 4 commits into from
Jan 19, 2023
Merged

Fix Query with no key parse #1066

merged 4 commits into from
Jan 19, 2023

Conversation

ili101
Copy link
Contributor

@ili101 ili101 commented Jan 16, 2023

Description of the Change

Fix #1065

@ili101
Copy link
Contributor Author

ili101 commented Jan 17, 2023

Test was falsely passing as apparently:

$c = [System.Collections.Specialized.NameValueCollection]::new()
$c    $c.Add($null, 'blue')
# Key is ""

Is not the same as:

$c = [System.Web.HttpUtility]::ParseQueryString('?blue')
# Key is $null

Get-PodeCount was filtering '?blue' but not '?blue&foo=bar' which was not consistent, now it will not filter $null keys.

src/Private/Helpers.ps1 Outdated Show resolved Hide resolved
Copy link
Owner

@Badgerati Badgerati left a comment

Choose a reason for hiding this comment

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

LGTM! :)

@Badgerati Badgerati added this to the 2.8.0 milestone Jan 19, 2023
@Badgerati Badgerati merged commit 316069a into Badgerati:develop Jan 19, 2023
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.

Query parsing error 400
2 participants