cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.76k stars 2.92k forks source link

Cross-site XHR with headers set fails to authenticate with proxy #4829

Closed DrTree closed 1 month ago

DrTree commented 1 month ago

Is there an existing issue for this?

CefSharp Version

125.0.210

Operating System

Windows 11

Architecture

x64

.Net Version

4.701

Implementation

WinForms

Reproduction Steps

Set windows up with system proxy configured to be an authenticating proxy using NTLM authentication

Add minimum CEF component Load Page A (doesn't matter what provided page B accepts it as an origin for cross-site XHR) Show dev tools In Dev console do eg:

var oReq = new XMLHttpRequest();
oReq.onload = () => { console.log(oReq.responseText) }
oReq.open("GET","https://httpbin.org/get");
oReq.setRequestHeader("afoo","bar")
oReq.send()

Expected behavior

The the above javascript completes without error and logs the response

Actual behavior

When the header is specified then the XHR fails with ERR:FAILED If you remove the line to add the header then the request succeeds

Regression?

No response

Known Workarounds

No response

Does this problem also occur in the CEF Sample Application

Yes - WinForms

Other information

amaitland commented 1 month ago

Does this problem also occur in the CEF Sample Application Yes - WinForms

As the problem reproduces with CEF sample application you'll need to raise an issue on the CEF issue tracker

https://github.com/chromiumembedded/cef/issues