Fixed parsing of \" in "" for http access logs.
This commit is contained in:
parent
1253e22ce1
commit
112afd61ed
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ public class HttpAccessLogParser
|
||||||
// '"$request" $status $body_bytes_sent '
|
// '"$request" $status $body_bytes_sent '
|
||||||
// '"$http_referer" "$http_user_agent"';
|
// '"$http_referer" "$http_user_agent"';
|
||||||
public static final Pattern COMBINED_PATTERN = Pattern.compile(
|
public static final Pattern COMBINED_PATTERN = Pattern.compile(
|
||||||
"^(?<remoteAddress>[a-fA-F0-9\\:\\.]+) - (?<remoteUser>[^\\[]+) \\[(?<time>[^\\]]+)\\] \"(?<request>.*)\" (?<status>\\d+) (?<bodyBytesSent>\\d+) \"(?<referer>[^\"]*)\" \"(?<userAgent>.*)\".*$");
|
"^(?<remoteAddress>[a-fA-F0-9\\:\\.]+) - (?<remoteUser>[^\\[]+) \\[(?<time>[^\\]]+)\\] \"(?<request>([^\"]|\\\")*)\" (?<status>\\d+) (?<bodyBytesSent>\\d+) \"(?<referer>([^\"]|\\\")*)\" \"(?<userAgent>([^\"]|\\\")*)\".*$");
|
||||||
|
|
||||||
public static final DateTimeFormatter DATETIME_FORMATTER = DateTimeFormatter.ofPattern("dd/MMM/yyyy:HH:mm:ss Z").withLocale(Locale.ENGLISH);
|
public static final DateTimeFormatter DATETIME_FORMATTER = DateTimeFormatter.ofPattern("dd/MMM/yyyy:HH:mm:ss Z").withLocale(Locale.ENGLISH);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue