Firefox does not display images

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Locked
Fire123
Posts: 6
Joined: July 20th, 2016, 11:03 am

Firefox does not display images

Post by Fire123 »

Hello,

I have a website which allows user to upload images. The image is stored on image server and image src is generated from backend with a token.
The problem is firefox does not load the image from that url unless the user is logged in(not as a guest) on my website.
Please see my screen shot for reference.
http://i1255.photobucket.com/albums/hh6 ... vt2kzl.png

Note: Chorme, IE works fine whether the user is login or as a guest.
I'm not using "\" instead of "/" in the path.
Is firefox using some authentication or having some security procedures that causing this behavior?(Looks like firefox is more strict than Chorme and IE in this case).

Thanks for any advise, I appreciate your help.

Regards
Last edited by trolly on July 20th, 2016, 11:34 am, edited 1 time in total.
Reason: Images too large.
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Re: Firefox does not display images

Post by trolly »

Because the text in the image is not readable, please post a link to a web site which shows the problem.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
Fire123
Posts: 6
Joined: July 20th, 2016, 11:03 am

Re: Firefox does not display images

Post by Fire123 »

Hi trolly,

thanks for your reply.
http://photo.samsclub.com --> click "View Photos"(third tab on main navigation menu) --> click "Add Photos" --> click "Upload photos from my computer" --> Choose photo --> click "Upload"
When the page redirect you to the My Albums page, you will see the broken thumbnail image.
(Doing the same steps for Chrome and IE will successfully see the correct thumbnail. I compared the url, they are the same.)
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Re: Firefox does not display images

Post by trolly »

There is possibly a problem with the answer of the redirect:
URL=https://photo.samsclub.com/account/logi ... Image.aspx&...

Response:
Content-Encoding:"gzip"
Content-Length:"14051"
Content-Type:"text/html; charset=utf-8"

Sure you want to send a web page? I thought you want to send an image.
Firefox is very strict about the content type.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
Fire123
Posts: 6
Joined: July 20th, 2016, 11:03 am

Re: Firefox does not display images

Post by Fire123 »

Yes I want to send a web page. The image is already stored on the image server when user upload the photo and I can see that photo on the website.
My problem is Firefox doesn't retrieve that image as the thumbnail, it is saying "failed to load the given url".
I've try to search a lot on google, turns out Firefox has a bug for relative path, but I don't think it is related to this issue as well..
What content type does Firefox blocks?
Fire123
Posts: 6
Joined: July 20th, 2016, 11:03 am

Re: Firefox does not display images

Post by Fire123 »

I also notice on chrome, a get request has been sent and got a response back

Request URL:http://photo.samsclub.com/util/GenerateImage.aspx?..
Request Method:GET
Status Code:200 OK

but on Firefox that get request did not sent at all under Net -- Images in firebug
User avatar
trolly
Moderator
Posts: 39851
Joined: August 22nd, 2005, 7:25 am

Re: Firefox does not display images

Post by trolly »

What is the structure of the web page?
I was not able to retrieve it from the transmission.

And forget about thinking URI as file paths. They are not paths and a relative path may not be handled correctly.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.
Lnwdz
Posts: 173
Joined: June 12th, 2012, 7:59 am

Re: Firefox does not display images

Post by Lnwdz »

It involves the header change that happened in Bug 1249474. The thumbnail displays correctly when preference
image.http.accept is changed from */*
back to image/png,image/*;q=0.8,*/*;q=0.5

I hope there's a fairly easy fix for the server.
Fire123
Posts: 6
Joined: July 20th, 2016, 11:03 am

Re: Firefox does not display images

Post by Fire123 »

Hi Lnwdz,
I tried to use Modify Response Headers addon for firefox and change the content-type for header as you mentioned, but it's still not work.
How did you see the thumbnail is showing correctly?
Thanks for your suggestion.
Lnwdz
Posts: 173
Joined: June 12th, 2012, 7:59 am

Re: Firefox does not display images

Post by Lnwdz »

In about:config I modified preference
image.http.accept to value image/png,image/*;q=0.8,*/*;q=0.5
Then I followed your steps for uploading a photo. I tested several times in different profiles and in a new private window. The response headers are completely changed when image.http.accept is set to the new default */*. There's a redirect to a login page (like trolly suggested) instead of the image:

Code: Select all

GET /util/GenerateImage.aspx?q=1kYKEknIR0Npf9UaP4egOvXOYC7_6EVjd8Rva9JWeAxrc3uK
WEh3dgXT_bdBZZvBiyNhmKO1hFAK808HlvaRRL3Fl2jOP5b6_RR8qUl7vuHvuYsbQLAv19bq7sY1ffYdZMj
v3v68n0qtBf71cFFAd4Zz4o592HrDHHAMgLH4lRUc5INyeW1VLBL_SxbFCWSJK8ADok_ipjNs-&width=168&height=107 HTTP/1.1
Host: photo.samsclub.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:47.0) Gecko/20100101 Firefox/47.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://photo.samsclub.com/Album/Order/Prints?album=25326671
Cookie: optimizelyEndUserId=oeu14 ....etc.
Connection: keep-alive

HTTP/1.1 302 Found
Location: /account/login.aspx?ReturnUrl=%2futil%2fGenerateImage.aspx&q=1kYKEknIR0Npf9UaP4egOvXOYC7_6EVjd8Rva9JWeAxrc3uK
WEh3dgXT_bdBZZvBiyNhmKO1hFAK808HlvaRRL3Fl2jOP5b6_RR8qUl7vuHvuYsbQLAv19bq7sY1ffYdZMj
v3v68n0qtBf71cFFAd4Zz4o592HrDHHAMgLH4lRUc5INyeW1VLBL_SxbFCWSJK8ADok_ipjNs-&width=168&height=107
Access-Control-Allow-Origin: *
Date: Fri, 22 Jul 2016 10:44:09 GMT
Content-Length: 0
x-content-type-options: nosniff
X-Frame-Options: SAMEORIGIN
x-xss-protection: 1; mode=block
I captured that with the Live HTTP headers addon.
Fire123
Posts: 6
Joined: July 20th, 2016, 11:03 am

Re: Firefox does not display images

Post by Fire123 »

Hi Lnwdz,

I solved this problem using another way by showing the image without redirect the user to login page.
Thank you for your advise and I appreciate your help.
Locked