ITADN

URL.encode should percent-encode colons (:) in query parameter values (breaks form-urlencoded compatibility)

#3935Openwi101 创建于 2026-01-28
bug
W
wi101commented
**Describe the bug** Since v3.8.0 (PR #3870), URL.encode no longer percent-encodes colons (`:`) , this breaks compatibility with application/x-www-form-urlencoded encoding that most systems expect for query parameter values. https://url.spec.whatwg.org/#application/x-www-form-urlencoded **To Reproduce** ```scala import zio.http._ val url = URL.root .addQueryParam("pe", "http://example.com") .encode ``` Result: `/?pe=http:%2F%2Fexample.com` **Expected behaviour** `pe=http%3A%2F%2Fexample.com`
0 条评论