##// END OF EJS Templates
Fixed downloading images with complex content-type header
neko259 -
r982:c170e0ea default
parent child Browse files
Show More
@@ -251,7 +251,7 b' class PostForm(NeboardForm):'
251 try:
251 try:
252 # Verify content headers
252 # Verify content headers
253 response_head = requests.head(url, verify=False)
253 response_head = requests.head(url, verify=False)
254 content_type = response_head.headers['content-type']
254 content_type = response_head.headers['content-type'].split(';')[0]
255 if content_type in CONTENT_TYPE_IMAGE:
255 if content_type in CONTENT_TYPE_IMAGE:
256 length_header = response_head.headers.get('content-length')
256 length_header = response_head.headers.get('content-length')
257 if length_header:
257 if length_header:
General Comments 0
You need to be logged in to leave comments. Login now