{"action":"created","issue":{"url":"https://api.github.com/repos/buaazp/zimg/issues/118","labels_url":"https://api.github.com/repos/buaazp/zimg/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/buaazp/zimg/issues/118/comments","events_url":"https://api.github.com/repos/buaazp/zimg/issues/118/events","html_url":"https://github.com/buaazp/zimg/issues/118","id":106370168,"number":118,"title":"Wrong \"Content-Type\" header when format is converted","user":{"login":"niko","id":3075,"avatar_url":"https://avatars.githubusercontent.com/u/3075?v=3","gravatar_id":"","url":"https://api.github.com/users/niko","html_url":"https://github.com/niko","followers_url":"https://api.github.com/users/niko/followers","following_url":"https://api.github.com/users/niko/following{/other_user}","gists_url":"https://api.github.com/users/niko/gists{/gist_id}","starred_url":"https://api.github.com/users/niko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niko/subscriptions","organizations_url":"https://api.github.com/users/niko/orgs","repos_url":"https://api.github.com/users/niko/repos","events_url":"https://api.github.com/users/niko/events{/privacy}","received_events_url":"https://api.github.com/users/niko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-14T15:44:25Z","updated_at":"2015-09-15T03:27:34Z","closed_at":null,"body":"The \"Content-Type\" header doesn't reflect the requested and delivered format.\r\n\r\nI store a jpg and request a jpg, png and gif. The \"Content-Type\" header is always \"image/jpeg\" although the actual content is the requested:\r\n\r\n```bash\r\n# getting the original:\r\n% curl 'http://localhost:4869/2491d096ff849c2b34cf7177572b4932' > foo.jpg \r\n\r\n# it's a jpeg:\r\n% file foo.jpg\r\nfoo.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 240x240, segment length 16, Exif Standard: [TIFF image data, little-endian, direntries=11, manufacturer=NIKON CORPORATION, model=NIKON D700, orientation=upper-left, xresolution=175, yresolution=183, resolutionunit=2, software=Adobe Photoshop Elements 6.0 Macintosh, datetime=2009:01:27 22:15:32], baseline, precision 8, 1440x900, frames 3\r\n\r\n# the content-type header is correct:\r\n% curl 'http://localhost:4869/2491d096ff849c2b34cf7177572b4932' -i\r\nEtag: 1dd98723862c8c7f8bd1c393ba7c97ce\r\nServer: zimg/3.1.0 Linux 7db38cfd501a\r\nContent-Type: image/jpeg\r\nCache-Control: max-age=7776000\r\nContent-Length: 101381\r\n…\r\n\r\n# getting the gif:\r\n % curl 'http://localhost:4869/2491d096ff849c2b34cf7177572b4932?f=gif' > foo.gif\r\n\r\n# it is a gif:\r\n % file foo.gif\r\nfoo.gif: GIF image data, version 89a, 1440 x 900\r\n\r\n# but the content-type header says it's a jpeg:\r\n% curl 'http://localhost:4869/2491d096ff849c2b34cf7177572b4932?f=gif' -i\r\nEtag: 6ac086a9f23cdbcce0e675afc1e063ab\r\nServer: zimg/3.1.0 Linux 7db38cfd501a\r\nContent-Type: image/jpeg\r\nCache-Control: max-age=7776000\r\nContent-Length: 442525\r\n…\r\n\r\n# getting a png:\r\n% curl 'http://localhost:4869/2491d096ff849c2b34cf7177572b4932?f=png' > foo.png\r\n\r\n# it is a png:\r\n% file foo.png\r\nfoo.png: PNG image data, 1440 x 900, 8-bit grayscale, non-interlaced\r\n\r\n# the content-type header is wrongly jpg:\r\n% curl 'http://localhost:4869/2491d096ff849c2b34cf7177572b4932?f=png' -i\r\nEtag: 9430d4dc01a6a5284f5ba796630f59d3\r\nServer: zimg/3.1.0 Linux 7db38cfd501a\r\nContent-Type: image/jpeg\r\nCache-Control: max-age=7776000\r\nContent-Length: 734755\r\n…\r\n```"},"comment":{"url":"https://api.github.com/repos/buaazp/zimg/issues/comments/140269286","html_url":"https://github.com/buaazp/zimg/issues/118#issuecomment-140269286","issue_url":"https://api.github.com/repos/buaazp/zimg/issues/118","id":140269286,"user":{"login":"hjjoe1213123","id":13696132,"avatar_url":"https://avatars.githubusercontent.com/u/13696132?v=3","gravatar_id":"","url":"https://api.github.com/users/hjjoe1213123","html_url":"https://github.com/hjjoe1213123","followers_url":"https://api.github.com/users/hjjoe1213123/followers","following_url":"https://api.github.com/users/hjjoe1213123/following{/other_user}","gists_url":"https://api.github.com/users/hjjoe1213123/gists{/gist_id}","starred_url":"https://api.github.com/users/hjjoe1213123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjjoe1213123/subscriptions","organizations_url":"https://api.github.com/users/hjjoe1213123/orgs","repos_url":"https://api.github.com/users/hjjoe1213123/repos","events_url":"https://api.github.com/users/hjjoe1213123/events{/privacy}","received_events_url":"https://api.github.com/users/hjjoe1213123/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T03:27:34Z","updated_at":"2015-09-15T03:27:34Z","body":"The issue which the author mentioned before explanation of this Content-Type, you can go down, as the gif picture types of pictures to use to display the correct gif"}}