Commit ab8daeb
authored
Fix outdated regexp of apache2 parser (#647)
The regexp shown in parser/apache2.md was the one used before v1.14.2.
Escape sequences were first allowed by df5ac352 "Allow escape sequences in
Apache access log" (v0.14.14), which used `(?:[^\"]|\\.)`, and that is the
form the document still shows. The source was later narrowed by db93f4b9
"parser_apache2: Fix too wide matching regexp" (v1.14.2):
- REGEXP = ... (?<path>(?:[^\"]|\\.)*?) ... (?<referer>(?:[^\"]|\\.)*) ... (?<agent>(?:[^\"]|\\.)*) ...
+ REGEXP = ... (?<path>(?:[^\"]|\\")*?) ... (?<referer>(?:[^\"]|\\")*) ... (?<agent>(?:[^\"]|\\")*) ...
The document was not updated at that time. So it still says that any
backslash-escaped character is accepted in path, referer and agent, while
the current implementation accepts only an escaped double quote.
The new text is copied from Apache2Parser::REGEXP.source of the v1.19
branch and was compared with the document line to confirm they are
identical.
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>1 parent 1e6fa26 commit ab8daeb
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments