Do not return content from cacheByHTTP if the request errors, otherwise callers can process bad content, like SC assets expecting RSS feeds and getting 404 error pages.
This commit is contained in:
parent
4f85ad56e6
commit
275fcd0bb8
2 changed files with 5 additions and 4 deletions
|
|
@ -9,6 +9,7 @@
|
|||
- RFE: 9730 (actually missing documentation)
|
||||
- fixed: Crud updateFromFormPost
|
||||
- fixed: encryptLogin and sslEnabled both need to be true
|
||||
- fixed: Cache's setByHTTP method returns content, even when it gets an error in the request. This gives the SC asset fits.
|
||||
|
||||
7.10.24
|
||||
- fixed #12318: asset error causes asset manager to fail
|
||||
|
|
|
|||
|
|
@ -242,11 +242,11 @@ sub setByHTTP {
|
|||
my $response = $userAgent->request($request);
|
||||
if ($response->is_error) {
|
||||
$self->session->errorHandler->error($url." could not be retrieved.");
|
||||
return undef;
|
||||
}
|
||||
else {
|
||||
$self->set($response->decoded_content,$ttl);
|
||||
}
|
||||
return $response->decoded_content;
|
||||
my $value = $response->decoded_content;
|
||||
$self->set($value ,$ttl);
|
||||
return $value;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue