mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-06 11:48:47 +00:00
SplitHTTP: Replace responseOkPadding with xPaddingBytes (#3643)
This commit is contained in:
@@ -11,41 +11,8 @@ func Test_GetNormalizedPath(t *testing.T) {
|
||||
Path: "/?world",
|
||||
}
|
||||
|
||||
path := c.GetNormalizedPath("hello", true)
|
||||
if path != "/hello?world" {
|
||||
t.Error("Unexpected: ", path)
|
||||
}
|
||||
}
|
||||
|
||||
func Test_GetNormalizedPath2(t *testing.T) {
|
||||
c := Config{
|
||||
Path: "?world",
|
||||
}
|
||||
|
||||
path := c.GetNormalizedPath("hello", true)
|
||||
if path != "/hello?world" {
|
||||
t.Error("Unexpected: ", path)
|
||||
}
|
||||
}
|
||||
|
||||
func Test_GetNormalizedPath3(t *testing.T) {
|
||||
c := Config{
|
||||
Path: "hello?world",
|
||||
}
|
||||
|
||||
path := c.GetNormalizedPath("", true)
|
||||
if path != "/hello/?world" {
|
||||
t.Error("Unexpected: ", path)
|
||||
}
|
||||
}
|
||||
|
||||
func Test_GetNormalizedPath4(t *testing.T) {
|
||||
c := Config{
|
||||
Path: "hello?world",
|
||||
}
|
||||
|
||||
path := c.GetNormalizedPath("", false)
|
||||
if path != "/hello/" {
|
||||
path := c.GetNormalizedPath()
|
||||
if path != "/" {
|
||||
t.Error("Unexpected: ", path)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user