Roxen.git/
server/
base_server/
roxen.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2009-07-15
2009-07-15 15:28:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>
f53ac591da1c44d5535630a7636a49f3c198983d (
15
lines) (+
11
/-
4
)
[
Show
|
Annotate
]
Branch:
5.2
Protect against zone_to_ascii() throwing errors.
Rev: server/base_server/roxen.pike:1.1039
6:
// Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others. // ABS and suicide systems contributed freely by Francesco Chemolli
-
constant cvs_version="$Id: roxen.pike,v 1.
1038
2009/07/
07
11
:
57
:
39
jonasw
Exp $";
+
constant cvs_version="$Id: roxen.pike,v 1.
1039
2009/07/
15
15
:
28
:
03
grubba
Exp $";
//! @appears roxen //!
2529:
if (lower_case (host) == "any" || host == "::") host = "*";
-
else
+
else
{
+
// Note: zone_to_ascii() can throw errors on invalid hostnames.
+
if (catch {
// FIXME: Maybe Standards.URI should do this internally? host = lower_case(Standards.IDNA.zone_to_ascii (host));
-
+
}) {
+
host = lower_case(host);
+
}
+
}
if (has_value (host, ":")) if (string h = port_match_form ?