From 0bce5a5f0333e72f746af9339484707d2b9d3f95 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 29 Jan 2010 19:52:42 +0000 Subject: [PATCH] ssl option --- FS/FS/part_export/thirdlane.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/FS/FS/part_export/thirdlane.pm b/FS/FS/part_export/thirdlane.pm index f2846fc7f..0537e784c 100644 --- a/FS/FS/part_export/thirdlane.pm +++ b/FS/FS/part_export/thirdlane.pm @@ -13,7 +13,10 @@ tie my %options, 'Tie::IxHash', #'server' => { label => 'Thirdlane server name or IP address', }, 'username' => { label => 'Thirdlane username', }, 'password' => { label => 'Thirdlane password', }, - 'port' => { label => 'Port number if not 80', }, + 'ssl' => { label => 'Enable HTTPS (SSL) connection', + type => 'checkbox', + }, + 'port' => { label => 'Port number if not 80 or 443', }, 'prototype_tenant' => { label => 'Prototype tenant name', }, 'debug' => { label => 'Checkbox label', type => 'checkbox' }, # 'select_option' => { label => 'Select option description', @@ -253,10 +256,11 @@ sub _export_delete { sub _thirdlane_command { my($self, @param) = @_; - my $url = 'http://'. uri_escape($self->option('username')). ':'. - uri_escape($self->option('password')). '@'. - $self->machine; - $url.= ':'. $self->option('port') if $self->option('port'); + my $url = $self->option('ssl') ? 'https://' : 'http://'; + $url .= uri_escape($self->option('username')). ':'. + uri_escape($self->option('password')). '@'. + $self->machine; + $url .= ':'. $self->option('port') if $self->option('port'); $url .= '/xmlrpc.cgi'; warn "$me connecting to $url\n" -- 2.11.0