fix wrong content type handling

This commit is contained in:
Somdev Sangwan
2018-11-27 15:59:01 +05:30
committed by GitHub
parent 51e07b5e95
commit 2f0a925e1c

View File

@@ -45,7 +45,7 @@ def htmlParser(response, encoding):
break
num += 1
if '<' not in response:
if rawResponse.headers['Content-Type'] == 'text/html':
if rawResponse.headers['Content-Type'].startswith('text/html'):
location = 'html'
locations.append(location) # add location to locations list