Improved http error handling

This commit is contained in:
Michael 2021-10-29 23:21:07 +00:00
commit 4236a9a105
55 changed files with 282 additions and 135 deletions

View file

@ -20,6 +20,7 @@
*/
use Friendica\DI;
use Friendica\Network\HTTPException\NotModifiedException;
use Friendica\Util\Strings;
require_once 'view/theme/frio/theme.php';
@ -225,8 +226,7 @@ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset($_SERVER['HTTP_IF_NONE_MA
stripslashes($_SERVER['HTTP_IF_NONE_MATCH']));
if (($cached_modified == $modified) && ($cached_etag == $etag)) {
header('HTTP/1.1 304 Not Modified');
exit();
throw new NotModifiedException();
}
}