Loading lib/Travel/Status/DE/EFA.pm +11 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Carp qw(confess cluck); use DateTime; use DateTime::Format::Strptime; use Encode qw(encode); use IO::Socket::SSL; use JSON; use Travel::Status::DE::EFA::Departure; use Travel::Status::DE::EFA::Info; Loading Loading @@ -66,6 +67,7 @@ sub new_p { sub new { my ( $class, %opt ) = @_; my $tls_insecure = 0; $opt{timeout} //= 10; if ( $opt{timeout} <= 0 ) { delete $opt{timeout}; Loading Loading @@ -105,6 +107,9 @@ sub new { $opt{efa_url} .= '/XML_DM_REQUEST'; } $opt{time_zone} //= $service->{time_zone}; if ( not $service->{tls_verify} ) { $tls_insecure = 1; } } } Loading Loading @@ -248,6 +253,12 @@ sub new { } else { my %lwp_options = %{ $opt{lwp_options} // { timeout => 10 } }; if ($tls_insecure) { $lwp_options{ssl_opts}{SSL_verify_mode} = IO::Socket::SSL::SSL_VERIFY_NONE; $lwp_options{ssl_opts}{verify_hostname} = 0; } $self->{ua} = LWP::UserAgent->new(%lwp_options); $self->{ua}->env_proxy; } Loading lib/Travel/Status/DE/EFA/Services.pm.PL +12 −6 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ sub load_instance { url => $opt{url} // $data->{options}{endpoint} =~ s{ / $ }{}rx, time_zone => $data->{timezone}, languages => $data->{supportedLanguages}, tls_verify => $opt{tls_verify} // 1, coverage => { area => $data->{coverage}{realtimeCoverage}{area}, regions => $data->{coverage}{realtimeCoverage}{region} // [] Loading @@ -35,6 +36,11 @@ sub load_instance { # VRT: Encoding issues # VVSt: NXDOMAIN my %efa_instance = ( AVV => { url => 'https://fahrtauskunft.avv-augsburg.de/efa', name => 'Augsburger Verkehrs- & Tarifverbund', tls_verify => 0, }, BEG => { url => 'https://bahnland-bayern.de/efa', name => 'Bayerische Eisenbahngesellschaft', Loading Loading
lib/Travel/Status/DE/EFA.pm +11 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use Carp qw(confess cluck); use DateTime; use DateTime::Format::Strptime; use Encode qw(encode); use IO::Socket::SSL; use JSON; use Travel::Status::DE::EFA::Departure; use Travel::Status::DE::EFA::Info; Loading Loading @@ -66,6 +67,7 @@ sub new_p { sub new { my ( $class, %opt ) = @_; my $tls_insecure = 0; $opt{timeout} //= 10; if ( $opt{timeout} <= 0 ) { delete $opt{timeout}; Loading Loading @@ -105,6 +107,9 @@ sub new { $opt{efa_url} .= '/XML_DM_REQUEST'; } $opt{time_zone} //= $service->{time_zone}; if ( not $service->{tls_verify} ) { $tls_insecure = 1; } } } Loading Loading @@ -248,6 +253,12 @@ sub new { } else { my %lwp_options = %{ $opt{lwp_options} // { timeout => 10 } }; if ($tls_insecure) { $lwp_options{ssl_opts}{SSL_verify_mode} = IO::Socket::SSL::SSL_VERIFY_NONE; $lwp_options{ssl_opts}{verify_hostname} = 0; } $self->{ua} = LWP::UserAgent->new(%lwp_options); $self->{ua}->env_proxy; } Loading
lib/Travel/Status/DE/EFA/Services.pm.PL +12 −6 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ sub load_instance { url => $opt{url} // $data->{options}{endpoint} =~ s{ / $ }{}rx, time_zone => $data->{timezone}, languages => $data->{supportedLanguages}, tls_verify => $opt{tls_verify} // 1, coverage => { area => $data->{coverage}{realtimeCoverage}{area}, regions => $data->{coverage}{realtimeCoverage}{region} // [] Loading @@ -35,6 +36,11 @@ sub load_instance { # VRT: Encoding issues # VVSt: NXDOMAIN my %efa_instance = ( AVV => { url => 'https://fahrtauskunft.avv-augsburg.de/efa', name => 'Augsburger Verkehrs- & Tarifverbund', tls_verify => 0, }, BEG => { url => 'https://bahnland-bayern.de/efa', name => 'Bayerische Eisenbahngesellschaft', Loading