Loading images without extension

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Loading images without extension

Postby Thijs » Thu Feb 09, 2017 5:42 am

Hi!

I'm having some issues when loading images from a CDN, where the resources are available from a url without extension. For example:
https://vg-images.condecdn.net/image/rymMV59dRxN/crop/200/square

You'll see a lot of this when opening http://www.vogue.co.uk

The server does respond with a proper MIME-type: image/jpeg. So I'd expect the browser to just load and treat it as an image.

However when using CEF, the resource gets the status CANCELED and is never fully loaded.

For a normal asset I get these function calls from CefRequestHandler:
Code: Select all
OnBeforeResourceLoad()
GetResourceResponseFilter()
OnResourceResponse()
OnResourceLoadComplete() // URLRequestStatus = UR_SUCCESS


However for the extension-less images I only get these function calls:
Code: Select all
OnBeforeResourceLoad()
OnResourceLoadComplete() // URLRequestStatus = UR_CANCELED, response->GetMimeType() = NULL


Is this expected behaviour? Is there anything I can do to force the image to load?
I've tried adding request headers like:
Accept: */*
Cache-Control: no-cache
Pragma: no-cache

Thijs
Thijs
Newbie
 
Posts: 2
Joined: Thu Feb 09, 2017 5:17 am

Re: Loading images without extension

Postby magreenblatt » Thu Feb 09, 2017 10:35 am

What OS and CEF version? How does it behave in Google Chrome at the same version?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Loading images without extension

Postby Thijs » Mon Feb 13, 2017 7:20 am

OS: Windows 10 x64
CEF: 3.2785.1482.g16e49fb

I noticed that in the latest cefclient build the images were loading properly. Since it was easier for me to update my application to the latest CEF than to downgrade Chrome, I did the former.

Now it all works good! Using CEF 3.2924.1566.ga6a3da2.

Thanks for the quick response though, and I'll make sure to check the latest CEF version and compare to Chrome from now on :)
Thijs
Newbie
 
Posts: 2
Joined: Thu Feb 09, 2017 5:17 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 94 guests