File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,12 +123,12 @@ public function loadSource(array $source): void
123123 Logger::info ('No response from ' . $ source ['src ' ] . ' - attempting to re-use cached metadata ' );
124124 $ this ->addCachedMetadata ($ source );
125125 return ;
126- } elseif (preg_match ( ' @^HTTP/(2\.0|1\.[01])\s304\s@ ' , $ responseHeaders [ 0 ]) ) {
126+ } elseif ($ response -> getStatusCode () === 304 ) {
127127 // 304 response
128128 Logger::debug ('Received HTTP 304 (Not Modified) - attempting to re-use cached metadata ' );
129129 $ this ->addCachedMetadata ($ source );
130130 return ;
131- } elseif (! preg_match ( ' @^HTTP/(2\.0|1\.[01])\s200\s@ ' , $ responseHeaders [ 0 ]) ) {
131+ } elseif ($ response -> getStatusCode () !== 200 ) {
132132 // Other error
133133 Logger::info ('Error from ' . $ source ['src ' ] . ' - attempting to re-use cached metadata ' );
134134 $ this ->addCachedMetadata ($ source );
You can’t perform that action at this time.
0 commit comments