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

Don't form empty queries; closes #451 #452

Merged
merged 2 commits into from Jul 24, 2017

Conversation

Projects
None yet
2 participants
@jennybc
Member

jennybc commented Jun 22, 2017

See #451

Before:

library(httr)
modify_url("http://google.com", query = list(a = NULL))
#> [1] "http://google.com/?="
modify_url("http://google.com", query = list())
#> [1] "http://google.com/?"

After:

devtools::load_all()
#> Loading httr
modify_url("http://google.com", query = list(a = NULL))
#> [1] "http://google.com/"
modify_url("http://google.com", query = list())
#> [1] "http://google.com/"

@jennybc jennybc referenced this pull request Jun 22, 2017

Closed

Empty but non-NULL query #451

@hadley hadley merged commit ce50e60 into r-lib:master Jul 24, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hadley

This comment has been minimized.

Member

hadley commented Jul 24, 2017

Ooops, I merged slightly too soon. Would you mind doing another PR to add a bullet to news?

@jennybc jennybc deleted the jennybc:trivial-queries branch Jul 24, 2017

jiwalker-usgs added a commit to jiwalker-usgs/httr that referenced this pull request Jul 24, 2017

Don't form empty queries; closes r-lib#451 (r-lib#452)
* Make compact() sensitive to length vs. NULL

* Recognize more forms of empty query; closes r-lib#451
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment