User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Steps to reproduce: Step 1) Host a webpage on a web-server (I used a tomcat 8 server). Let's say this webpage is accessible on http://domain-a.com. On this webpage put a <img src="http://domain-b.com:8080/ws-api/v1/workflows/1003/image?token=497633086"> Step 2) Host a rest service on domain-b.com that returns a PNG image for the above url (http://domain-b.com:8080/ws-api/v1/workflows/1003/image?token=497633086) Step 3) Setup CORS such that domain-b.com allows request from domain-a.com Step 4) Access the above webpage using Firefox 47 or later. Important Notes: The same scenario works perfectly in Firefox 45 ESR, Chrome 51, IE 11 but not in Firefox 47 or later. The exact headers exchanged are below: Request Headers: Host: 10.111.17.152:8091 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://10.111.17.152:8090/ws-web/projects/1379/tasks Connection: keep-alive Pragma: no-cache Cache-Control: no-cache Response Headers: Access-Control-Allow-Headers: accept, content-type, token, cache-control, x-requested-with Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT, PATCH, OPTIONS Cache-Control: no-cache, no-store, max-age=0, must-revalidate Content-Type: image/png;charset=utf-8 Date: Wed, 27 Jul 2016 13:30:09 GMT Server: Apache-Coyote/1.1 Transfer-Encoding: chunked X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1 From my investigations FFOX 47 sends a "Accept: */*" request header for the above <img src=..." instead of an "Accept: "image/png, */*, ...." header that is sent by FFOX 45. If I manually change the request header to "image/png" in the FFox inspector, network tab, using "edit and resend" button then the request is done correctly. Actual results: The image is not rendered. Expected results: Image is rendered correctly.
Severity: normal → critical
OS: Unspecified → Windows 7
Priority: -- → P1
Hardware: Unspecified → x86_64
The Accept header change seems to be a result of bug 1249474
Severity: critical → normal
Component: Untriaged → Networking: HTTP
Priority: P1 → --
Product: Firefox → Core
Hi ltrifoi, it sounds like your server is misconfigured. It should be able to respond with an "image/png" asset when the Accept header is "*/*".
Hey Mike - I thought OP was saying that it did respond with an image, we just didn't render it. At least the response header in comment 0 has a image content-type
Oh, hmm. I missed that. ltrifoi, can you confirm that an image is sent but it's just not rendered in the case of sending "*/*"? A screenshot of the network panel of the devtools would be helpful as well (or a public link to a server) -- thanks! See https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor
Flags: needinfo?(miket) → needinfo?(ltrifoi)
Yes, I confirm that the image is sent but it's just not rendered.
Actually, let me double check that and I'll also attach the network panel screenshots :)
I've double checked. Indeed it was a server misconfiguration. Sorry for wasting your time.
Thanks for filing the bug. Even if it turns out to be nothing, it's better to make sure :)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
No worries, thanks for the report!
You need to log in before you can comment on or make changes to this bug.