You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mark at KUED noted a case where he's using the client via a proxy, but there's not a current means to pass the necessary CURL_OPTION flags to the client to make it work.
I propose to add an overall options array argument to the client constructor, and if that array includes a CURL_OPTIONS array apply those to the 'build_curl_handle()' function.
The text was updated successfully, but these errors were encountered:
Was looking at implementing this if no one has yet. Couple thoughts:
Should this be a separate method configure_curl or something something? In an effort to keep the constructor arg list small.
I assume we are allowing any option to be passed in, without filtering. Presumably if an invalid option is passed in we let it silently fail (I think that is how curl_setopt works, but it has been a while)
curl_setopt calls that the we are already using, presumably overwrite what is passed in by the user?
I kind of was thinking a single big options array arg -- updating to
new PBS_Media_Manager_Client($client_id = '', $client_secret = '', $base_endpoint = '', $options = array())
since there's bound to be more options we'll want to add in the future. But I don't feel super strongly about that, there may be a case in the future for having more complete control over curl configuration.
As for filtering, I was going to suggest we keep it simple -- if there's an array 'curl_setopt', pass those straight to build_curl_handle, without validation. If they're not valid calls, they'll fail on their own. And if they attempt to overwrite something we've already set, well, everyone can see the source code and can see what they shouldn't have done. Everything we're setting as a curl_setopt now
@acrosman a question I have is, are there any specifics RE the drupal module that we need to watch out for? Since that's the primary usecase now.
Mark at KUED noted a case where he's using the client via a proxy, but there's not a current means to pass the necessary CURL_OPTION flags to the client to make it work.
I propose to add an overall options array argument to the client constructor, and if that array includes a CURL_OPTIONS array apply those to the 'build_curl_handle()' function.
The text was updated successfully, but these errors were encountered: