osiell / oerplib

OERPLib is a Python RPC library which aims to provide an easy way to remotely pilot and manage an OpenERP server.
GNU Lesser General Public License v3.0
21 stars 20 forks source link

Support Odoo version auto-discovery via HTTPS #8

Closed danielkauffman closed 9 years ago

danielkauffman commented 10 years ago

ConnectorXMLRPC always uses HTTP when auto-discovering the Odoo version.

If the service is running on HTTPS, the auto-discovery fails and the url is set to None. ConnectorXMLRPCSSL then tries to rewrite the url from HTTP to HTTPS but fails because the url is set to None.

A work-around when using the library is to explicitly set the version when creating a connection. That works for me.

But for future versions of the library, something like the attached would be an easy (as yet untested) means to support auto-discovery via HTTPS.

sebalix commented 9 years ago

Hi,

Sorry for being late... I completely forgot your PR! I confirm this bug, but your code does not seem to work, but as you said it has not been tested. I will take a look, thanks!

sebalix commented 9 years ago

Okay it was nothing, self.scheme was not defined. Fixed in b06e8c380448edb4966f8283146b124a2dd7a01e. Thanks for the fix.

danielkauffman commented 9 years ago

You're welcome, glad I could contribute.