Fix case sensitive host
This commit is contained in:
parent
084d00a156
commit
e12ddca1a5
4 changed files with 33 additions and 19 deletions
|
@ -36,7 +36,7 @@ func TestParseTwoRules(t *testing.T) {
|
|||
serverRoute := &serverRoute{route: route}
|
||||
rules := &Rules{route: serverRoute}
|
||||
|
||||
expression := "Host:foo.bar;Path:/foobar"
|
||||
expression := "Host: Foo.Bar ; Path:/FOObar"
|
||||
routeResult, err := rules.Parse(expression)
|
||||
|
||||
if err != nil {
|
||||
|
@ -58,11 +58,13 @@ func TestParseDomains(t *testing.T) {
|
|||
"Host:foo.bar,test.bar",
|
||||
"Path:/test",
|
||||
"Host:foo.bar;Path:/test",
|
||||
"Host: Foo.Bar ;Path:/test",
|
||||
}
|
||||
domainsSlice := [][]string{
|
||||
{"foo.bar", "test.bar"},
|
||||
{},
|
||||
{"foo.bar"},
|
||||
{"foo.bar"},
|
||||
}
|
||||
for i, expression := range expressionsSlice {
|
||||
domains, err := rules.ParseDomains(expression)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue