-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows system proxy URL behavior differs from IE/Edge/Chrome #38670
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
cc: @wfurt |
Tagging subscribers to this area: @dotnet/ncl |
Could you be more specific @filipnavara, I don't understand the use case. Why |
Maybe I was not clear in describing it. What happened was that I was diagnosing an issue with customer that has a system proxy setup. The setup looked somewhat like this: Notice that the proxy address is entered with the "http://" prefix even though it's supposed to be just plain DNS name. The browsers seem to cope with this, so if you try to open a web site in Chrome/Edge/IE it will connect the proxy ( |
ok. that would make sense. e.g. strip extra |
Hrm, I could swear we are already stripping that off, unless it's coming over super whack e.g. http://http://... |
It certainly looks like it's trying to: runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpWindowsProxy.cs Line 93 in b534378
|
Ah, that's just the bypass. |
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/MultiProxy.cs Lines 237 to 246 in b534378
|
@scalablecory Interesting. Apparently a similar code exists in the .NET Core 3.1 branch as well: I wonder why it didn't work on that setup. |
@filipnavara are you able to test the behavior in .NET 5? |
I'll try to reproduce it on my machine with both .NET 3.1.x and .NET 5. I have very limited access to the customer's system where we noticed the issue and no way to deploy custom binaries there. |
After looking at the code in .NET 3.1 I feel the problem could be that if the system proxy is specified as |
Triage: we should repro for 3.1 and 5.0, and decide if this needs fixing in 3.1. |
So, the behavior written in the comment above is present on both .NET 5 and .NET Core 3.1. If the system proxy is prefixed with |
Today i stumbled around this issue. It is still present in .NET 6. Configuration.NET 6.0.21 |
Description
When the system proxy is set to URL beginning with "http://" most browsers automatically strip it and work with the settings. However, .NET applications don't do that and so the same system settings appear not to work. It's easy to fix on the user's machine by deleting the prefix in the system settings but it's non-obvious problem to diagnose. Maybe it would make sense to align the behavior with the browsers and strip the prefix too.
Configuration
.NET Core 3.1.400
Windows 10 x64
The text was updated successfully, but these errors were encountered: