Исправлен хэш UA
This commit is contained in:
@@ -68,13 +68,15 @@ public class PatternService {
|
||||
String content = new String(bytes);
|
||||
final java.util.regex.Pattern regex = compilePattern(pattern);
|
||||
final Matcher matcher = regex.matcher(content);
|
||||
int startPos = 0;
|
||||
|
||||
while (matcher.find()) {
|
||||
while (matcher.find(startPos)) {
|
||||
found.add(FoundPattern.builder()
|
||||
.patternId(pattern.getId())
|
||||
.startPosition(matcher.start())
|
||||
.endPosition(matcher.end())
|
||||
.build());
|
||||
startPos = matcher.end() + 1;
|
||||
}
|
||||
|
||||
return found;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class StreamService {
|
||||
private final boolean ignoreEmptyPackets;
|
||||
|
||||
private final byte[] GZIP_HEADER = {0x1f, (byte) 0x8b, 0x08};
|
||||
private final java.util.regex.Pattern userAgentPattern = java.util.regex.Pattern.compile("User-Agent: (.+)\\n");
|
||||
private final java.util.regex.Pattern userAgentPattern = java.util.regex.Pattern.compile("User-Agent: (.+)\\r\\n");
|
||||
|
||||
@Autowired
|
||||
public StreamService(StreamRepository repository,
|
||||
|
||||
Reference in New Issue
Block a user