Skip to content

Commit 20f31c6

Browse files
committed
fix :
Signed-off-by: Jess Frazelle <[email protected]>
1 parent 29e032c commit 20f31c6

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.2.24
1+
v0.2.25

cmd/utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ func expandURL(u *url.URL, expansions map[string]string) error {
5959

6060
// Set the path parameters
6161
u.RawQuery = values.Encode()
62+
// We want colons in the query string to be unescaped.
63+
u.RawQuery = strings.Replace(u.RawQuery, "%253A", ":", -1)
6264

6365
return nil
6466
}

cmd/utils_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ func TestExpandURL(t *testing.T) {
3939
},
4040
testServerURL + "/file/convert?outputFormat=obj&srcFormat=step",
4141
},
42+
// Path params added as extras.
43+
{
44+
"file/mass",
45+
map[string]string{
46+
"unit": "kg:m3",
47+
},
48+
testServerURL + "/file/mass?unit=kg:m3",
49+
},
4250
}
4351

4452
for i, test := range expandTests {

utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ func expandURL(u *url.URL, expansions map[string]string) error {
5959

6060
// Set the path parameters
6161
u.RawQuery = values.Encode()
62+
// We want colons in the query string to be unescaped.
63+
u.RawQuery = strings.Replace(u.RawQuery, "%253A", ":", -1)
6264

6365
return nil
6466
}

utils_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ func TestExpandURL(t *testing.T) {
3939
},
4040
testServerURL + "/file/convert?outputFormat=obj&srcFormat=step",
4141
},
42+
// Path params added as extras.
43+
{
44+
"file/mass",
45+
map[string]string{
46+
"unit": "kg:m3",
47+
},
48+
testServerURL + "/file/mass?unit=kg:m3",
49+
},
4250
}
4351

4452
for i, test := range expandTests {

0 commit comments

Comments
 (0)