Speed up a little html encoding detection

Not sure this is a smart move
master
pictuga 2013-12-07 20:35:32 +01:00
parent 245ba99ae9
commit d2345a94f8
1 changed files with 1 additions and 1 deletions

View File

@ -308,7 +308,7 @@ def detEncoding(data, con=None):
log('header')
return con.headers.getparam('charset')
match = re.search('charset=["\']?([0-9a-zA-Z-]+)', data)
match = re.search('charset=["\']?([0-9a-zA-Z-]+)', data[:1000])
if match:
log('meta.re')
return match.groups()[0]