From 129edc5f7ea1618f7367f4bdd76186b3a2ed11f1 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 1 Dec 2024 22:09:18 +0100 Subject: Do not cache upstream CGI errors --- lib/Travel/Status/DE/HAFAS.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Travel/Status/DE/HAFAS.pm') diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index a56ba51..eea56a5 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -406,7 +406,9 @@ sub post_with_cache { if ($cache) { my $content = $cache->thaw( $self->{post} ); - if ($content) { + if ( $content + and not $content =~ m{ CGI_NO_SERVER | CGI_READ_FAILED }x ) + { if ( $self->{developer_mode} ) { say ' cache hit'; } -- cgit v1.2.3