Commit 3fdcc57
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 d1d7635 commit 3fdcc57
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 | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| |||
| 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