Commit abf5166
committed
Bugfix: Make util/request-url handle empty query string
Empty query strings would make request-url insert a trailing ?
in the url for no reason. While not strictly invalid, it's a bit ugly.
Empty query strings are added by ring.mock.request/request when you pass
in an empty map for parameters.
This fixes that by checking that the query string is not empty before
adding the ?.1 parent fd08dd8 commit abf5166
File tree
2 files changed
+6
-1
lines changed- ring-core
- src/ring/util
- test/ring/util/test
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
0 commit comments