-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use IE proxy by default #496
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
Conversation
…cause this reason we now using the WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY flag for proxy settings
Ensure that the strings inside this struct are always freed, which wasn't the case before.
Ensure that the strings inside this struct are always freed, which wasn't the case before.
Implement the recommended behaviour for "well-written WinHTTP apps", see https://blogs.msdn.microsoft.com/ieinternals/2013/10/11/understanding-web-proxy-configuration/ I.e. use IE proxy settings for the current user unless WinHTTP proxy is explicitly defined (which seems to be quite rare in practice). This makes applications using C++ REST SDK work out of the box on the networks where IE is configured to access the Internet (which will almost always be the case), whether via a fixed proxy or using proxy-configuration, using either WPAD or fixed PAC URL (this fixes microsoft#182 in passing).
@vadz, |
Adding a return statement after __assume(0) resulted in "warning C4702: unreachable code" when building with MSVC, which broke the build as warnings are fatal due to the use of /WX options. Fix this by using this return statement only with the Intel compiler, which apparently needs it (see e3f81c4).
Fix unreachable statement warning from MSVC after ICC warning fix
There is no message body for 1xx, 203 and 304 HTTP responses (see section 3.3.3/1 of RFC 7230), yet we tried to read it nevertheless when using ASIO backend, resulting in "Failed to read response body" exception being thrown. Fix this by explicitly skipping reading the body for these status codes.
Avoid spurious errors when handling HTTP responses without body
- http://www.cnn.com redirects users from countries outside of the US to the "http://edition.cnn.com/" drop location - Use http://edition.cnn.com, which does not redirect - even in the US - Fix microsoft#27
Fix cnn outside test
ah great. i have a similar pr for this (#500). 👍 |
- http://www.google.com redirects country specifically - Use http://code.google.com, which does not redirect (so far)
Thanks, I didn't know about |
Thanks for your answer :) Unfortunately you call 'WinHttpOpen' with a depricated flag on Win8.1 and greater. |
Well, the fact that it's deprecated doesn't really mean anything. It definitely still works (I've tested under Windows 10) and it's very unlikely to stop working in the observable future. Of course, in (very) long term we should just use |
Added NuGet.Config.
…_google Fix google outside tests
fix build on linux use clang
…oft#446 bugfix microsoft#446: fixed issue with wildchar handling on linux.
- Do not include xlocale.h on systems, where __GLIBC__ is defined xlocale.h has been removed from glibc 2.26 The include of locale.h in asyncrt_utils.h is sufficient Further details: https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b - Fixes microsoft#485
Thanks for your pull request! We (@xqp and me) tried the patch in our target environment and it worked fine finding the right proxy configuration! There was an issue though, that is related to WinHTTP: Apparently setting the user agent in the Maybe you happen to know what could be a workaround for this? |
@reneme Sorry, I don't know anything about this, I didn't test with a proxy performing User-Agent checks (why would anybody do that!?) and if the Microsoft person at the linked answer says that there is no workaround, I'm inclined to believe him... Perhaps you can use ASIO backend under Windows instead of WinHTTP one? Of course, you wouldn't be able to automatically use IE proxy with it then. |
fix lambda capture 'this' is not used, clang 5.0 on ubuntu 16.04
Fixed proxy credentials for http_client_asio
FIX Build error on Ubuntu Xenial when using OpenSSH 1.1.0b
…_by_empty_string Fix/win32 encryption throws by empty string
Adding 308 "Permanent Redirect" to http_constants.dat
Add support for retrieving remote address in HTTP listener
Fix memory leak of WINHTTP_PROXY_INFO fields
…_xlocale Fix build error with glibc 2.26, xlocale.h
…revocation-pr enable certificate revocation check with winhttp
Use system proxy
…restsdk into vadz-use-ie-proxy-by-default
Thanks for the PR! I've merged this with #500, so the general proxy detection logic should be used both when the client is set to "Default" as well as "Auto Configure". |
This is, IMO, a pretty important, even if simple, change as it makes applications C++ REST SDK to work out of the box on many corporate networks where they currently don't work by default and, if a fixed PAC URL is used, can't be made to work at all (see #182). With this change, they should work correctly in all cases, provided IE Internet access settings are configured correctly which is, IMO, always the case (at least if Internet access is allowed at all).
Please notice that this PR includes the commit already submitted as #495 as it reuses a struct declared there, so if you apply this PR entirely, you can close #495.