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

Request.QueryParams with empty key #542

Closed
llodi-csw opened this issue Mar 3, 2022 · 1 comment
Closed

Request.QueryParams with empty key #542

llodi-csw opened this issue Mar 3, 2022 · 1 comment
Assignees
Labels
accepted Issue has been accepted and inserted in a future milestone bug

Comments

@llodi-csw
Copy link

If you are making a request with a query string like this:

...?codice

the Request.QueryParams dictionary will be created with only one pair<key,value> both empty.

I think the problem is in TMVCWebRequest.GetQueryParams .
Below you can see the value of FWebRequest related to the example:
image

is this a correct behavior?
IMHO In this example the object Request.QueryParams should be empty because there are no valid parameters (with '=') in the querystring.

@danieleteti
Copy link
Owner

Related RFC is not clear about the query string internal format.
Some info here: https://stackoverflow.com/questions/4557387/is-a-url-query-parameter-valid-if-it-has-no-value
However, DMVCFramework should thread
?codice

as if it were

?codice=

So there should be a param codice with an empty value.
I think this is a bug. I'll give a look ASAP

@danieleteti danieleteti self-assigned this Mar 3, 2022
@danieleteti danieleteti added accepted Issue has been accepted and inserted in a future milestone bug labels Mar 3, 2022
@danieleteti danieleteti added this to the 3.2.2-nitrogen milestone Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Issue has been accepted and inserted in a future milestone bug
Projects
None yet
Development

No branches or pull requests

2 participants