Closed gtramontina closed 1 year ago
The regular expression to detect whether the content resambles HTML uses the global flag, which makes it stateful. So, from time to time (depending on the content-length) the regular expression finally reaches the end and returns false.
global
false
Although there's a fix on #12, it seems to me that a slightly more reliable check would be to look for <!doctype html> or <html>.
<!doctype html>
<html>
The regular expression to detect whether the content resambles HTML uses the
global
flag, which makes it stateful. So, from time to time (depending on the content-length) the regular expression finally reaches the end and returnsfalse
.