Code review comment for lp:~milo/lava-tool/server-rpc-endpoint-fix

Revision history for this message
Antonio Terceiro (terceiro) wrote :

On Tue, Aug 06, 2013 at 09:37:08AM -0000, Milo Casagrande wrote:
> On Thu, Aug 1, 2013 at 2:04 AM, Antonio Terceiro
> <email address hidden> wrote:
> >
> > I don't understand why you need to parse the url just to unparse it a
> > few lines below. This function seems rather pointless to me.
>
> Because if somebody when prompted for the server URL enters just
> "127.0.0.1/RPC2", withouth the scheme, we will get a rather unpleasant
> "IOError: unsupported XML-RPC protocol" error.
>
> So, I need to look into the given URL and make sure we have a scheme,
> or default to HTTPS, and that the URL has a trailing slash (since
> looks like lava-tool auth-add adds it by default when adding an auth
> token). That's why I parse the URL first, check what's necessary, and
> then unparse it to create back the full URL.

OK - bring it in then

 review approve

review: Approve

« Back to merge proposal