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

Added method to get query string parameters insignificant of order #36

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

khaliddermoumi
Copy link

Hi Darell!

Finally I made the change we discussed recently. Notes:

  • added a new method "GetParametersNonStrict()". "GetParameters()" still works as before.
  • "GetParametersNonStrict()" does NOT return null when there's no match, but an empty dictionary
  • "GetParameters()" still returns null when there is no match. I would change this behaviour.
    • if you want me to change this, please let me know, I'm into the code now and can do it in a minute
  • added some unit tests

Regards,
Khalid

…meters()" that ignores the order of query parameters. Note that this method returns an empty dictionary instead of null when no match is found.

Plus some unit tests.
@khaliddermoumi
Copy link
Author

Darell,
I just fixed a bug meanwhile.

@darrelmiller
Copy link
Member

Thanks for this PR. Unfortunately, it is hard to review the changes because it appears that every line seems to have changed in the URITemplate class. I will try and look again later today.

@khaliddermoumi
Copy link
Author

khaliddermoumi commented Jul 1, 2016

Hi Darell,

my Visual Studio wanted to indent the lines evenly (a part of the class was indented with 4 spaces less than the rest). The github UI doesn't "ignore whitespace" in diffs.
Try reviewing the changes in VS.

Regards

@khaliddermoumi
Copy link
Author

How about it, Darell? Any plans to make a change here?

@darrelmiller
Copy link
Member

@khaliddermoumi Sorry for going dark. Yes, I'd like to incorporate this change as part of a bigger fix. It turns out there is an issue with parsing arrays of values, reported by Anthony from Glimpse. Depending on where the parameter is in the URITemplate there are different delimiters that are allowed. Therefore I am going to have to split the URL into authority, path, query and fragment in order to do parameter matching. This will allow me to apply different rules to the query.
Hopefully next week I'll get a chance to work on this.

@khaliddermoumi
Copy link
Author

Thx Darrel!

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