mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Throw caught exceptions in HTTPCacheControlMiddleware::process
This commit is contained in:
parent
37343cf0e2
commit
6bb69d1ae5
@ -33,6 +33,7 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
|
||||
* @param HTTPRequest $request
|
||||
* @param callable $delegate
|
||||
* @return HTTPResponse
|
||||
* @throws HTTPResponse_Exception
|
||||
*/
|
||||
public function process(HTTPRequest $request, callable $delegate)
|
||||
{
|
||||
@ -50,6 +51,9 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
|
||||
}
|
||||
|
||||
HTTP::add_cache_headers($response);
|
||||
if (isset($ex)) {
|
||||
throw $ex;
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user