-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Reusing http_client instance with proxies #170
Comments
Yes, reusing Looking at http_client_asio.cpp, I don't quite see the issue. The |
Thanks for confirming. So all I am doing is (on OS X) to go to System Prefrences/Network/Advanced/Proxies and then set up HTTPS proxy (so to answer your question: I am trying with HTTPS). Then I create an http_client instance, set the proxy on it and make a request, which succeeds - so proxy support is working great. Then I make another request to the same endpoint using the same http_client instance and I am getting error 56. Reproducible. Regarding http_client_asio.cpp: you are most certainly right, I did not dig into the details, I just saw that that is the actual file where the error code is coming from. Probably I shouldn't have suggested that the issue is with the iterator. Regards, |
Re: PS |
Any more updates regarding this issue? It only happens on *NIX platforms it seems. We are experiencing the same issue on OS X/iOS and Linux. |
Hi,
We ran into this weird issue that when we are trying to reuse an http_client instance with an http_config where proxy is set, the first time the request succeeds, but the subsequent times we get error 56, ""Failed to connect to any resolved proxy endpoint".
Tracked this down to http_client_asio.cpp and it almost looks like that the endpoints iterator is incremented the first time and then on subsequent requests points to the end?
Any thoughts?
Also, can you please confirm that in general it is OK (in fact desired) to reuse http_clients for the same base address and then bombard the same instance with ->request calls vs creating a new http_client per request?
regards,
Gergely
The text was updated successfully, but these errors were encountered: