Merge pull request #259 from guludo/fix-content_type-https

Detect HTTPS links in content_type()
main
Fabien C. Y. Benureau 3 years ago committed by GitHub
commit 4ec4ba0390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -114,7 +114,7 @@ def write_file(filepath, data, mode='w'):
def content_type(path): def content_type(path):
parsed = urlparse(path) parsed = urlparse(path)
if parsed.scheme == 'http': if parsed.scheme in ('http', 'https'):
return 'url' return 'url'
else: else:
return 'file' return 'file'

Loading…
Cancel
Save