mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
Do not encode dot in args
This commit is contained in:
@@ -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))
|
||||
|
||||
+1
-1
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user