Page 1 of 1

GefRequestHandler.GetAuthCredentials not called for images

PostPosted: Mon Oct 05, 2020 11:02 am
by joher
I am having a problem with proxy authentication and images. It seems the GefRequestHandler.GetAuthCredentials never gets called when loading images via an img tag. I know this worked in older versions (v62 at least).

I have boiled it down to the simplest case I could think of, just having a local html file on disk, referencing an image on the web, and running Fiddler as a proxy requiring authentication. In real life things are a lot more complicated, but we seem to get the same behavior. If I reference the same url as src on an iframe, prompting for credentials works as expected.

I see that there have been changes to the CefRequestHander and that you now can override CefRequestHandler.GetResourceRequestHandler to provide a CefResourceRequestHandler to control resource loading. If I do that I can see that loading the image fails with status 407. Proxy Authentication Required.

Is this behavior as expected? If so, is there a way to get GefRequestHandler.GetAuthCredentials to be called in this case as well, or any other way to solve the problem?

Re: GefRequestHandler.GetAuthCredentials not called for imag

PostPosted: Mon Oct 05, 2020 11:58 am
by magreenblatt
What OS and CEF version are you testing? How does it behave in Google Chrome at the same version (do you get the proxy authentication dialog?)

Re: GefRequestHandler.GetAuthCredentials not called for imag

PostPosted: Mon Oct 05, 2020 12:39 pm
by joher
I am on Windows 10 Pro, version 1709, build 16299.1087 and testing on CEF versions 81.2.17+gb382c62+chromium-81.0.4044.113 and 84.4.1+gfdc7504+chromium-84.0.4147.105.

Google Chrome 85.0.4183.121 behaves the same way. No proxy authentication dialog for images.

Re: GefRequestHandler.GetAuthCredentials not called for imag

PostPosted: Mon Oct 05, 2020 1:29 pm
by magreenblatt
I suggest filing a bug with Chromium at https://crbug.com/. For best results describe the reproduction case in the context of Google Chrome.

Re: GefRequestHandler.GetAuthCredentials not called for imag

PostPosted: Mon Oct 05, 2020 1:43 pm
by joher
Thanks. Will do that.