mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-15 09:10:25 +08:00
修复合并URL中多余分隔符时导致参数发生变化的Bug
This commit is contained in:
@@ -16,6 +16,11 @@ func TestCleanPath(t *testing.T) {
|
||||
a.IsTrue(CleanPath("/hello////world") == "/hello/world")
|
||||
}
|
||||
|
||||
func TestCleanPath_Args(t *testing.T) {
|
||||
a := assert.NewAssertion(t)
|
||||
a.IsTrue(CleanPath("/hello/world?base=///////") == "/hello/world?base=///////")
|
||||
}
|
||||
|
||||
func BenchmarkCleanPath(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = CleanPath("/hello///world/very/long/very//long")
|
||||
|
||||
Reference in New Issue
Block a user