-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cannot set HTTP proxy through CURLOPT_PROXY and CURLOPT_PROXYPORT #12
Comments
Well, ideally, the module wouldn't be using curl here at all, but use the HTTP API made available by drupal, which takes care of setting proxy settings globally if required. |
The |
OK, I see. Yeah, maybe it can swap out the HTTP Api/Implementation based on where it's being used. |
It uses curl and it make sense to add configuration for proxy settings and other parameters (in the case reproted by @grischard we also had to set the User Agent header) |
I'd vote for passing configuration through code instead of using a config file, since the latter wouldn't allow for an easy configuration UI e.g. in Drupal. An implementation of |
Agree and we can easily add our own connection classes in custom modules. |
Curl options are hard-coded in CMRF/Connection/Curl.php, making it impossible to use an http proxy, which are required in some environments.
CMRF_Abstract_Core/CMRF/Connection/Curl.php
Lines 44 to 51 in a89b4db
Ideally, it should be possible to set or override all of these curl options in a config file - I can for example imagine wanting to override CURLOPT_SSL_VERIFYPEER, CURLOPT_SSL_VERIFYHOST or CURLOPT_SSLVERSION in this context.
As a workaround, it is possible to edit CMRF/Connection/Curl.php locally, but that's obviously a hack.
The text was updated successfully, but these errors were encountered: