aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

Consider adding flag to fall back to natural libcurl proxy behavior

Open rwolfson opened this issue 3 years ago • 2 comments

Hi AWS C++ SDK folks, I recently hit similar behavior regarding libcurl environment variables as reported in #1049 . Although I understand the desire for certain customers not wanting this automatic behavior, the default behavior is very helpful in many other environments. Specifically, it allows developers to create more deployment-agnostic code that doesn't need to implement boilerplate proxy detection logic or flags.

Would it be possible to consider a CMake flag that skips the block that sets CURLOPT_PROXY to ""? https://github.com/aws/aws-sdk-cpp/blob/1.8.155/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp#L613-L616

That would hopefully avoid breaking customers that rely on the default behavior, but provide an opportunity for customers that want the default libcurl behavior to have their applications function similarly to other libcurl applications.

An alternative implementation could be an automaticProxy flag in ClientConfiguration that skips that specific CURLOPT_PROXY option from being set. This is a little bit less transparent than the preprocessor option since it would require application code changes to utilize.

Thank you for your consideration. I'm happy to submit a PR if this seems like a worthwhile improvement.

rwolfson avatar Mar 04 '21 23:03 rwolfson

I agree, using environment variables by default, and providing an option to ignore them for the special case would be ideal.

sahil1105 avatar Apr 06 '21 16:04 sahil1105

This behavior is something that we want to add, but I don't have a timeline for when it will get added

jmklix avatar Mar 25 '22 18:03 jmklix

This was added with this PR. Please update to the latest version of this sdk and let us know if you have any other features that could improve this sdk.

jmklix avatar Sep 22 '23 22:09 jmklix

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Sep 22 '23 22:09 github-actions[bot]