Raise errors for non-ASCII domain names in a router's rules
This commit is contained in:
parent
1e716a93ff
commit
a513a05b7a
6 changed files with 118 additions and 23 deletions
|
@ -60,6 +60,16 @@ func Test_addRoute(t *testing.T) {
|
|||
"http://localhost/foo": http.StatusOK,
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "Non-ASCII Host",
|
||||
rule: "Host(`locàlhost`)",
|
||||
expectedError: true,
|
||||
},
|
||||
{
|
||||
desc: "Non-ASCII HostRegexp",
|
||||
rule: "HostRegexp(`locàlhost`)",
|
||||
expectedError: true,
|
||||
},
|
||||
{
|
||||
desc: "HostHeader equivalent to Host",
|
||||
rule: "HostHeader(`localhost`)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue