[Kolab-devel] SSL configuration chaos for the HTTP_Request2 object

Aleksander Machniak machniak at kolabsys.com
Sun Aug 25 11:35:11 CEST 2013


On 08/25/2013 11:22 AM, Daniel Hoffend wrote:
> I see one issue here. kolab_files as for now doesn't require libkolab
>> plugin. Because it's possible (in the future) to use this plugin and
>> Chwala out of kolab, maybe it would be reasonable to keep separation of
>> this plugin and use separate code and configuration of HTTP_Request2
>> object.
> Well as long as chwala is based on the roundcube framework (bootstrap)
> and libkolab is listed in the /usr/share/chwala/lib/kolab/plugins folder
> i wouldn't see an issue with using the method from libkolab aswell.

Plugins are used only by kolab backend. It is possible to write another
backend in Chwala to support other storage e.g. owncloud. Then kolab
plugins will not be used. Chwala shouldn't depend on them.

> Sure. After thinking about it, it maybe would even make more sense to use
> a config array like $config['kolab_http_request'] instead of a list of
> allowed options. This way you can controll all possible HTTP_Request2´
> options like adapter, proxy, timeout, ssl, etc.

Sounds fine.

>> I think we should create a static method in libkolab plugin. So, all
>> kolab plugins would use:
>>
>> $this->require_plugin('libkolab');
>> $request = libkolab::http_request();
> 
> Well maybe if we just switch to a config array options it's not needed to
> create a wrapper function. I just looked into HTTP_Request2 and it
> accepts an arry with options aswell. Not sure if that's worth a wrapper
> function.
> 
> $request = new HTTP_Request2($url);
> if(($config = rcube::get_instance()->config->get('kolab_http_request'))
> !== null) {
>     try {
>         $request->setConfig($config);
>     } catch (HTTP_Request2_Exception $e) {
>         rcube::log_error("HTTP_Request2_Exception: " . $e->getMessage());
>     }
> }

there's also require_once 'HTTP/Request2'; line. So, all in all, it
might be reasonable to have all in one place.

-- 
Aleksander Machniak
Software Developer
Kolab Systems AG: http://kolabsys.com
PGP: 19359DC1


More information about the devel mailing list