aboutsummaryrefslogtreecommitdiff
path: root/lib/Apache
diff options
context:
space:
mode:
authorroot <root@rbsd.ankarstrom.se>2021-04-25 20:32:25 +0000
committerroot <root@rbsd.ankarstrom.se>2021-04-25 20:32:25 +0000
commitc6407f93a8d38f04ec46d8868159f385396f73af (patch)
treecab86c4e2e210773bdee94f8bad628a45ff0caaa /lib/Apache
parente0778a8e6ec87b34077776a72f01f4d0305ae7e2 (diff)
downloadApache-Inject-c6407f93a8d38f04ec46d8868159f385396f73af.tar.gz
Optimize regex
by arranging the alternatives in the order of their likeliness to occur.
Diffstat (limited to 'lib/Apache')
-rw-r--r--lib/Apache/Inject/Handler.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Apache/Inject/Handler.pm b/lib/Apache/Inject/Handler.pm
index 10d9d0c..21be3c0 100644
--- a/lib/Apache/Inject/Handler.pm
+++ b/lib/Apache/Inject/Handler.pm
@@ -15,12 +15,12 @@ my $doc = qr{
(<!doctype[^>]*>)? \s*
(<html[^>]*>)? \s*
( <head[^>]*>.*?</head> \s*
- | ( <title[^>]*>.*?</title> \s*
- | <base[^>]*> \s*
- | <meta[^>]*> \s*
+ | ( <meta[^>]*> \s*
| <link[^>]*> \s*
+ | <title[^>]*>.*?</title> \s*
| <style[^>]*>.*?</style> \s* # n.b.
| <script[^>]*>.*?</script> \s* # n.b.
+ | <base[^>]*> \s*
)+
)?
(<body[^>]*>)?