mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-17 19:00:25 +08:00
同时设置Websocket允许来源域和防盗链时,以Websocket设置为优先
This commit is contained in:
@@ -145,6 +145,23 @@ func TestHTTPRequest_httpRequestNextId_Concurrent(t *testing.T) {
|
||||
a.IsTrue(countDuplicated == 0)
|
||||
}
|
||||
|
||||
func TestHTTPParseURL(t *testing.T) {
|
||||
for _, s := range []string{
|
||||
"",
|
||||
"null",
|
||||
"example.com",
|
||||
"https://example.com",
|
||||
"https://example.com/hello",
|
||||
} {
|
||||
host, err := httpParseHost(s)
|
||||
if err == nil {
|
||||
t.Log(s, "=>", host)
|
||||
} else {
|
||||
t.Log(s, "=>")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkHTTPRequest_httpRequestNextId(b *testing.B) {
|
||||
runtime.GOMAXPROCS(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user