summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-12-01 22:09:18 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-12-01 22:09:18 +0100
commit129edc5f7ea1618f7367f4bdd76186b3a2ed11f1 (patch)
tree93a5d9a025c421ebd0bfe531de078503b7e6e131
parent6dbea619077301eefefd5e9d63ae808ebbb7cb61 (diff)
Do not cache upstream CGI errors
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm4
1 files changed, 3 insertions, 1 deletions
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';
}