You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by si...@apache.org on 2023/12/17 09:11:35 UTC

svn commit: r1914735 - in /spamassassin/trunk: Makefile.PL lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm lib/Mail/SpamAssassin/Util/DependencyInfo.pm sa-update.raw t/decodeshorturl.t

Author: sidney
Date: Sun Dec 17 09:11:35 2023
New Revision: 1914735

URL: http://svn.apache.org/viewvc?rev=1914735&view=rev
Log:
Bug 8203 - Add LWP::Protocol::https as dependency where needed

Modified:
    spamassassin/trunk/Makefile.PL
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Util/DependencyInfo.pm
    spamassassin/trunk/sa-update.raw
    spamassassin/trunk/t/decodeshorturl.t

Modified: spamassassin/trunk/Makefile.PL
URL: http://svn.apache.org/viewvc/spamassassin/trunk/Makefile.PL?rev=1914735&r1=1914734&r2=1914735&view=diff
==============================================================================
--- spamassassin/trunk/Makefile.PL (original)
+++ spamassassin/trunk/Makefile.PL Sun Dec 17 09:11:35 2023
@@ -385,7 +385,7 @@ $makefile{META_MERGE} = {
         'Mail::DKIM' =>                0.37,
         'DBI' =>                       0,
         'DBD::SQLite' =>               1.59_01,
-        'LWP::UserAgent' =>            0,
+        'LWP::Protocol::https' =>      0,
         'Encode::Detect::Detector' =>  0,
         'Net::Patricia' =>             1.16,
         'Net::CIDR::Lite' =>           0,

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm?rev=1914735&r1=1914734&r2=1914735&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/DecodeShortURLs.pm Sun Dec 17 09:11:35 2023
@@ -91,7 +91,7 @@ use vars qw(@ISA);
 
 my $VERSION = 4.00;
 
-use constant HAS_LWP_USERAGENT => eval { require LWP::UserAgent; };
+use constant HAS_LWP_USERAGENT => eval { require LWP::UserAgent; require LWP::Protocol::https; };
 
 sub dbg { my $msg = shift; return Mail::SpamAssassin::Logger::dbg("DecodeShortURLs: $msg", @_); }
 sub info { my $msg = shift; return Mail::SpamAssassin::Logger::info("DecodeShortURLs: $msg", @_); }

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Util/DependencyInfo.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Util/DependencyInfo.pm?rev=1914735&r1=1914734&r2=1914735&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Util/DependencyInfo.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Util/DependencyInfo.pm Sun Dec 17 09:11:35 2023
@@ -252,6 +252,12 @@ our @OPTIONAL_MODULES = (
   or later is needed to provide SQLite 3.25.0 or later.',
 },
 {
+  module => 'LWP::Protocol::https',
+  version => 0,
+  desc => 'The "sa-update" program can use this module to make HTTPS requests.
+  Also used by DecodeShortURLs plugin.',
+},
+{
   module => 'LWP::UserAgent',
   version => 0,
   desc => 'The "sa-update" program can use this module to make HTTP requests.

Modified: spamassassin/trunk/sa-update.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/sa-update.raw?rev=1914735&r1=1914734&r2=1914735&view=diff
==============================================================================
--- spamassassin/trunk/sa-update.raw (original)
+++ spamassassin/trunk/sa-update.raw Sun Dec 17 09:11:35 2023
@@ -100,6 +100,7 @@ BEGIN {
   
     $have_lwp = eval {
     require LWP::UserAgent;
+    require LWP::Protocol::https;
   };
 
   if (eval { require IO::Socket::IP }) {  # handles IPv6 and IPv4

Modified: spamassassin/trunk/t/decodeshorturl.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/decodeshorturl.t?rev=1914735&r1=1914734&r2=1914735&view=diff
==============================================================================
--- spamassassin/trunk/t/decodeshorturl.t (original)
+++ spamassassin/trunk/t/decodeshorturl.t Sun Dec 17 09:11:35 2023
@@ -5,12 +5,14 @@ use SATest; sa_t_init("decodeshorturl");
 
 use Test::More;
 
+use constant HAS_LWP_USERAGENT => eval { require LWP::UserAgent; require LWP::Protocol::https; };
 use constant HAS_DBI => eval { require DBI; };
 use constant HAS_DBD_SQLITE => eval { require DBD::SQLite; DBD::SQLite->VERSION(1.59_01); };
 
 use constant SQLITE => (HAS_DBI && HAS_DBD_SQLITE);
 
 plan skip_all => "Net tests disabled"                unless conf_bool('run_net_tests');
+plan skip_all => "LWP::Protocol::https required to run this test" unless HAS_LWP_USERAGENT;
 my $tests = 11;
 $tests += 4 if (SQLITE);
 plan tests => $tests;