Skip to content

Strip query params with no value #3789

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
merged 3 commits into from
Nov 30, 2018
Merged

Strip query params with no value #3789

merged 3 commits into from
Nov 30, 2018

Conversation

mhoeger
Copy link
Contributor

@mhoeger mhoeger commented Nov 17, 2018

Resolves Azure/azure-functions-nodejs-worker#142

However, we need a better and more complete implementation of this, as an empty query is value is valid. Note that this is also an issue with null value'd HTTP headers.

@mhoeger mhoeger requested a review from fabiocav November 17, 2018 00:24
foreach (var pair in request.Query)
{
http.Query.Add(pair.Key, pair.Value.ToString());
if (!string.IsNullOrEmpty(pair.Value.ToString()))
Copy link
Member

Choose a reason for hiding this comment

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

Value here should never actually be null here, though.

@pragnagopa
Copy link
Member

@mhoeger - Can you please add test for this?

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.

3 participants