diff --git a/args.go b/args.go index e55b274..98e280d 100644 --- a/args.go +++ b/args.go @@ -299,7 +299,7 @@ func unhex(c byte) int { func appendQuotedArg(dst, v []byte) []byte { for _, c := range v { - if c >= '0' && c <= '9' || c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '/' { + if c >= '0' && c <= '9' || c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '/' || c == '.' { dst = append(dst, c) } else { dst = append(dst, '%', hexChar(c>>4), hexChar(c&15)) diff --git a/args_test.go b/args_test.go index c72a49c..ff6f739 100644 --- a/args_test.go +++ b/args_test.go @@ -29,7 +29,7 @@ func TestArgsString(t *testing.T) { testArgsString(t, &a, "foo=bar") testArgsString(t, &a, "foo=bar&baz=sss") testArgsString(t, &a, "") - testArgsString(t, &a, "f%20o=xxx%D0%BF%D1%80%D0%B8%D0%B2%D0%B5aaa&sdf=ss") + testArgsString(t, &a, "f%20o=x.x/x%D0%BF%D1%80%D0%B8%D0%B2%D0%B5aaa&sdf=ss") testArgsString(t, &a, "=asdfsdf") }