From a15cec7cd9faf228314c273ea49290f34be922e2 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 5 Jul 2020 16:12:12 -0400 Subject: [PATCH] Stringify default port numbers The IO::Socket classes expect strings for the port number because you can pass service names from `/etc/services`. Numbers work too, but using strings everywhere makes it easier to write unit tests. --- ddclient.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddclient.in b/ddclient.in index 056fca7..6573fe1 100755 --- a/ddclient.in +++ b/ddclient.in @@ -2009,10 +2009,10 @@ sub geturl { ## always omit SSL for connections to local router if ($force_ssl || ($globals{'ssl'} and (caller(1))[3] ne 'main::get_ip')) { $use_ssl = 1; - $default_port = 443; + $default_port = '443'; } else { $use_ssl = 0; - $default_port = 80; + $default_port = '80'; } debug("proxy = %s", $proxy); debug("protocol = %s", $use_ssl ? "https" : "http");