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

il_getParmStr on empty query paramter does return default value instead of empty string #57

Open
m1h43l opened this issue Mar 19, 2019 · 2 comments

Comments

@m1h43l
Copy link
Collaborator

m1h43l commented Mar 19, 2019

il_getParmStr does not work with the following HTTP message when used with a default value.

GET /?client HTTP/1.1
Host: localhost

The query parameter client has no value (which resembles an empty string). So if il_getParmStr is called like this

client = il_getParmStr(request : 'client' : defaultClient);

It should return an empty string and not the default value because the parameter does exist but it seems it is not added to the list of paramters, see https://github.com/sitemule/ILEastic/blob/master/src/ileastic.c#L255 .

Unit test request , test case test_rootResourceWithEmptyQueryParameterDefaultValue .

@m1h43l m1h43l changed the title il_getParmStr on empty query paramter does not return default value il_getParmStr on empty query paramter does return default value instead of empty string Mar 19, 2019
@NielsLiisberg
Copy link
Collaborator

@m1h43l - is this still an issue? or did you fix it? I can't remember....

@m1h43l
Copy link
Collaborator Author

m1h43l commented Mar 26, 2019

This is still an issue. The current code ignores query parameters without a value.

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

No branches or pull requests

2 participants