Skip to content

Commit

Permalink
[grab] Fix "wrong" header info ...
Browse files Browse the repository at this point in the history
... it's not exactly wrong, but from a strict point of view only "image/jpeg" is correct, while "image/jpg" isn't.

While most browser handle this nicely anyways, there are browsers that don't, e.g. Dolphin.
  • Loading branch information
Schimmelreiter committed Feb 1, 2017
1 parent cef0768 commit eaa93a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/controllers/models/grab.py
Expand Up @@ -54,7 +54,7 @@ def __init__(self, request, session):
sref = 'screenshot'
request.notifyFinish().addErrback(self.requestAborted)
request.setHeader('Content-Disposition', 'inline; filename=%s.%s;' % (sref, fileformat))
request.setHeader('Content-Type','image/%s' % fileformat)
request.setHeader('Content-Type','image/%s' % fileformat.replace("jpg","jpeg"))
request.setHeader('Cache-Control','no-cache')

def requestAborted(self, err):
Expand Down

0 comments on commit eaa93a3

Please sign in to comment.