We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I get a segfault with the following call stack:
libc.so.6![Unknown/Just-In-Time compiled code] (Unknown Source:0) Curl_setstropt(char ** charp, const char * s) (\home\user\.conan2\p\b\libcu0c6ab0202663c\b\src\lib\setopt.c:68) Curl_vsetopt(struct Curl_easy * data, CURLoption option, va_list param) (\home\user\.conan2\p\b\libcu0c6ab0202663c\b\src\lib\setopt.c:1604) curl_easy_setopt(struct Curl_easy * data, CURLoption tag) (\home\user\.conan2\p\b\libcu0c6ab0202663c\b\src\lib\setopt.c:3171) cpr::Session::prepareCommonShared(cpr::Session * const this) (\home\user\repos\tmp\cpr\cpr\session.cpp:184) cpr::Session::prepareCommon(cpr::Session * const this) (\home\user\repos\tmp\cpr\cpr\session.cpp:226) cpr::Session::PreparePost(cpr::Session * const this) (\home\user\repos\tmp\cpr\cpr\session.cpp:860) cpr::Session::Post(cpr::Session * const this) (\home\user\repos\tmp\cpr\cpr\session.cpp:748) [...]
This happens when a proxy is set, along with proxy authentication. Setting the proxy authentication manually in session.cpp resolved the issue for me:
// Proxy: const std::string protocol = url_.str().substr(0, url_.str().find(':')); if (proxies_.has(protocol)) { curl_easy_setopt(curl_->handle, CURLOPT_PROXY, proxies_[protocol].c_str()); if (proxyAuth_.has(protocol)) { // this worked: // std::string username = "user"; // std::string password = "password"; // curl_easy_setopt(curl_->handle, CURLOPT_PROXYUSERNAME, username.c_str()); // curl_easy_setopt(curl_->handle, CURLOPT_PROXYPASSWORD, password.c_str()); // this does trigger the segfault (original code): curl_easy_setopt(curl_->handle, CURLOPT_PROXYUSERNAME, proxyAuth_.GetUsername(protocol)); curl_easy_setopt(curl_->handle, CURLOPT_PROXYPASSWORD, proxyAuth_.GetPassword(protocol)); } }
cpr::Session
I didn't look into that, yet
GitHub (branch e.g. master)
The text was updated successfully, but these errors were encountered:
@simue thanks for reporting. Could you please create a small example application for me to reproduce this?
Sorry, something went wrong.
#1181
No branches or pull requests
Description
I get a segfault with the following call stack:
This happens when a proxy is set, along with proxy authentication.
Setting the proxy authentication manually in session.cpp resolved the issue for me:
Example/How to Reproduce
cpr::Session
Possible Fix
I didn't look into that, yet
Where did you get it from?
GitHub (branch e.g. master)
Additional Context/Your Environment
The text was updated successfully, but these errors were encountered: