28923ddd75
A proxy URI was parsed both in the function `proxy_read_environment()` in `libfreerdp/core/proxy.c` and in the function `freerdp_client_settings_parse_command_line_arguments()` in `client/common/cmdline.c`. But only the latter was taking into account that the URI can contain a user and password, which made it impossible to use a proxy with authentication by just using an environment variable like `https_proxy`. The function `proxy_parse_uri()` in `libfreerdp/core/proxy.c` was clearly not parsing the optional username and password. This commit moves the code from `client/common/cmdline.c` to `libfreerdp/common/settings.c` into a function `proxy_parse_uri()` so redundant code is avoided. This function is then called in both instances where a proxy URI is parsed. Some minor adjustment were made to the code, so the `WLog_INFO()` statement at the end works in both cases, where credentials were either provided or not. Also, some error messages were added or clarified. If the parsing of the environment variable fails, we ignore it entirely (with a warning) and proceed. |
||
---|---|---|
.. | ||
test | ||
client_rails.c | ||
client.c | ||
CMakeLists.txt | ||
cmdline.c | ||
cmdline.h | ||
file.c | ||
geometry.c | ||
smartcard_cli.c |