in SimpleHTTPResolver, when we are saving fie to cache, we are computing file-extension from request's content-type header. this extension will be then used in computing source_format at time of resolving.
But it is not normalizing content-type before dictionary lookup. Thus it doesn't support values like image/jpeg; charset=UTF-8, (archive.org responds like that.). We have to normalize it to image/jpeg before dictionary lookup.
in
SimpleHTTPResolver
, when we are saving fie to cache, we are computing file-extension from request'scontent-type
header. this extension will be then used in computingsource_format
at time of resolving.But it is not normalizing
content-type
before dictionary lookup. Thus it doesn't support values likeimage/jpeg; charset=UTF-8
, (archive.org responds like that.). We have to normalize it toimage/jpeg
before dictionary lookup.Here is the place in code:
https://github.com/loris-imageserver/loris/blob/3c641eb90bdde33ad5fe8fd1d39a78d424f4a5d7/loris/resolver.py#L301