Commit b0e3f08
committed
Keep the trailing equals sign out of parsed key names
String.split omits empty subsequences by default, so an argument ending in
"=" produced a single component. parseKeyValuePairs treated that as a
standalone key and stored the whole unsplit argument, leaving the equals
sign in the key name: "owner=" became the key "owner=" rather than "owner"
with an empty value.
The function's documentation states that a standalone key is treated as
"key=", so both spellings should produce the same key. Keeping empty
subsequences makes them agree.
This affects --label and --opt on `container volume create` and
`container network create`.
Fixes #20131 parent cec124f commit b0e3f08
2 files changed
Lines changed: 9 additions & 1 deletion
File tree
- Sources/Services/ContainerAPIService/Client
- Tests/ContainerAPIClientTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
0 commit comments