Skip to content

Commit

Permalink
Use undef rather than empty list in ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Jan 22, 2024
1 parent 23d8a40 commit e9806a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/LWP/Protocol/https.pm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ if ( $Net::HTTPS::SSL_SOCKET_CLASS->can('start_SSL')) {
my ($self,$sock,$url) = @_;
# SNI should be passed there only if it is not an IP address.
# Details: https://github.com/libwww-perl/libwww-perl/issues/449#issuecomment-1896175509
my $host = $url->host_port() =~ m/:|^[\d.]+$/s ? () : $url->host();
my $host = $url->host_port() =~ m/:|^[\d.]+$/s ? undef : $url->host();
$sock = LWP::Protocol::https::Socket->start_SSL( $sock,
SSL_verifycn_name => $url->host,
SSL_hostname => $host,
Expand Down

0 comments on commit e9806a0

Please sign in to comment.