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

@ -21,6 +21,7 @@
use Friendica\Core\Logger;
use Friendica\DI;
use Friendica\Network\HTTPException\NotModifiedException;
$uid = $_REQUEST['puid'] ?? 0;
@ -67,8 +68,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();
}
}
echo $stylecss;