@bboldi wrote:
I would like to load an image and show it on a controller in an img tag, interestingly some images are loaded without any problem, and some cause the image to show the 404 default icon instead. All external sources are whitelisted, so that should not be a problem ... I have found some differences in the header from the image server that might be the cause (i don't really see any other difference). Here is the header for the image that does not load in android (i use android 6 for testing):
HTTP/1.1 304 Not Modified Server: ECS (vie/F3AB) Date: Thu, 15 Sep 2016 12:20:15 GMT Last-Modified: Fri, 06 Feb 2015 13:52:46 GMT Etag: "1233570573" Cache-Control: max-age=31536000 Accept-Ranges: bytes Expires: Fri, 15 Sep 2017 12:20:15 GMT X-Cache: HIT GET /0/c/0c0c061e043ad9f3e691187160875b1c84ba282d.jpg HTTP/1.1 Host: www.example.com Connection: keep-alive Cache-Control: max-age=0 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 DNT: 1 Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8,hu-HU;q=0.6,hu;q=0.4,sr;q=0.2,sh;q=0.2,hr;q=0.2 If-None-Match: "1233570573" If-Modified-Since: Fri, 06 Feb 2015 13:52:46 GMT
and here are the headers from the image which loads without any problems
HTTP/1.1 304 Not Modified Server: nginx Date: Thu, 15 Sep 2016 12:18:28 GMT Last-Modified: Wed, 10 Sep 2014 21:49:06 GMT ETag: "5410c752-4c2f" Cache-Control: no-cache, must-revalidate Connection: keep-alive GET /static/uploads/photo/2013/05/03/13/14/flower-108685__180.jpg HTTP/1.1 Host: w.example.com Connection: keep-alive Cache-Control: max-age=0 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 DNT: 1 Accept-Encoding: gzip, deflate, sdch, br Accept-Language: en-US,en;q=0.8,hu-HU;q=0.6,hu;q=0.4,sr;q=0.2,sh;q=0.2,hr;q=0.2 Cookie: client_width=1265; _ga=GA1.2.447932829.1473941702; sessionid="eyJfbGFuZ3VhZ2UiOiJlbiJ9:1bkVZH:xDL9LgaIxhS6b1RAxjZUZwupmIE" If-None-Match: "5410c752-4c2f" If-Modified-Since: Wed, 10 Sep 2014 21:49:06 GMT
(I changed the domain names)
If anyone has any tip how to solve this, please don't hesitate to comment
thanks!
Posts: 1
Participants: 1