Skip to content

Allow URI queries without value#43

Merged
eile merged 2 commits intoHBPVIS:masterfrom
eile:master
Apr 1, 2016
Merged

Allow URI queries without value#43
eile merged 2 commits intoHBPVIS:masterfrom
eile:master

Conversation

@eile
Copy link
Copy Markdown
Contributor

@eile eile commented Mar 31, 2016

No description provided.

@eile eile changed the title Allow queries without value Allow URI queries without value Mar 31, 2016
tests/uri.cpp Outdated

BOOST_AUTO_TEST_CASE(query_without_value)
{
const servus::URI uri( "?foo,bar=foo,blubb" );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what's happening with 'foo=' or '=foo'?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

=foo will be ignored, which is reasonable. Another option will be throwing.
foo= should behave the same as foo, which is a key with an empty string as value. The code seems to do that but I wonder if std::string("foo").substr(3) works or crashes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added test for foo=

@dnachbaur
Copy link
Copy Markdown
Contributor

+1

@eile eile merged commit 0026e62 into HBPVIS:master Apr 1, 2016
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