diff --git a/src/web.d b/src/web.d index e0b2073..134bd4a 100755 --- a/src/web.d +++ b/src/web.d @@ -93,13 +93,11 @@ void do_content(string url) { html_push("
"); // first, see if we have something that wants to handle url outright foreach (StaticRegex!char reg, string h; handlers) { - try { - if (match(url, reg)) { - html(shell(dweb_root ~ "/bin/" ~ h ~ " " ~ url)); - html_pop("
"); - return; - } - } catch (std.regex.RegexException re) { continue; } + if (match(url, reg)) { + html(shell(dweb_root ~ "/bin/" ~ h ~ " " ~ url)); + html_pop(""); + return; + } } // if that failed, see if we can handle the file if (url == "" ? true : url[$-1] == '/') url ~= "index"; @@ -108,13 +106,11 @@ void do_content(string url) { string name = baseName(f); name = name[0] == '@' ? name[1..$] : name; if (stripExtension(name) == baseName(url)) { foreach (StaticRegex!char reg, string h; handlers) { - try { - if (match(name, reg)) { - html(shell(dweb_root ~ "/bin/" ~ h ~ " " ~ f)); - html_pop(""); - return; - } - } catch (std.regex.RegexException re) { continue; } + if (match(name, reg)) { + html(shell(dweb_root ~ "/bin/" ~ h ~ " " ~ f)); + html_pop(""); + return; + } } } }