52 if ( $this->eTag !==
null ) {
53 $resourceTag = $parser->
parseETag( $this->eTag );
54 if ( !$resourceTag ) {
55 throw new \Exception(
'Invalid ETag returned by handler: ' .
56 $parser->getLastError() );
61 $getOrHead = in_array( $request->
getMethod(), [
'GET',
'HEAD' ] );
62 if ( $request->
hasHeader(
'If-Match' ) ) {
65 foreach ( $parser->parseHeaderList( $im ) as $tag ) {
66 if ( $tag[
'whole'] ===
'*' && $this->hasRepresentation ) {
78 } elseif ( $request->
hasHeader(
'If-Unmodified-Since' ) ) {
80 if ( $requestDate !==
null
81 && ( $this->lastModified ===
null || $this->lastModified > $requestDate )
86 if ( $request->
hasHeader(
'If-None-Match' ) ) {
87 $inm = $request->
getHeader(
'If-None-Match' );
88 foreach ( $parser->parseHeaderList( $inm ) as $tag ) {
97 } elseif ( $getOrHead && $request->
hasHeader(
'If-Modified-Since' ) ) {
99 if ( $requestDate !==
null && $this->lastModified !==
null
100 && $this->lastModified <= $requestDate