mirror of https://gitlab.com/bashrc2/epicyon
Detecting http
parent
3a39dc6012
commit
a85767ad58
|
@ -479,6 +479,10 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if 'text/html' not in self.headers['Accept']:
|
||||
return False
|
||||
if self.headers['Accept'].startswith('*'):
|
||||
if self.headers.get('User-Agent'):
|
||||
if 'Elinks' in self.headers['User-Agent'] or \
|
||||
'Lynx' in self.headers['User-Agent']:
|
||||
return True
|
||||
return False
|
||||
if 'json' in self.headers['Accept']:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue