mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 03:19:36 +03:00
Sniff: Routing “attrs” support non http inbound (#3808)
* Sniff: Support attrs route in non http inbound * Add capability to sniff method and path * Fix test * Skip HTTP inbound PlainHTTP mode * Fix test again
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package http_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/xtls/xray-core/common/protocol/http"
|
||||
@ -88,7 +89,7 @@ first_name=John&last_name=Doe&action=Submit`,
|
||||
}
|
||||
|
||||
for _, test := range cases {
|
||||
header, err := SniffHTTP([]byte(test.input))
|
||||
header, err := SniffHTTP([]byte(test.input), context.TODO())
|
||||
if test.err {
|
||||
if err == nil {
|
||||
t.Errorf("Expect error but nil, in test: %v", test)
|
||||
|
Reference in New Issue
Block a user