Skip to content

Conversation

@rutchkiwi
Copy link

The previous behaviour was to insert an empty query string for an empty map of params, but leave out the key in case it was nil. This change makes it consistently leave out the :query-string in both cases.

The previous behaviour caused problems when using the ring request/request-url function - it would (and still does as of time of writing) add a trailing ? to the url when the empty query string is there. This can be confusing.

Discussion: ring-clojure/ring#543 (comment)

The previous behaviour was to insert an empty query string
for an empty map of params, but leave out the key in case it was nil.
This change makes it consistently leave out the :query-string in both cases.

The previous behaviour caused problems when using the ring request/request-url
function - it would (and still does as of time of writing) add a trailing ?
to the url when the empty query string is there. This can be confusing.

Discussion: ring-clojure/ring#543 (comment)
@rutchkiwi
Copy link
Author

Apologies for the kinda confusing commit message - I couldn't figure out how to phrase this better... Let me know if you think it makes sense, otherwise I can think of how to rephrase it.

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.

1 participant