Skip to content

Commit fd19d90

Browse files
committed
fix: Ignore non-HTML responses in storePreviousURL
1 parent f012cc7 commit fd19d90

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

system/CodeIgniter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,11 @@ public function storePreviousURL($uri)
10311031
return;
10321032
}
10331033

1034+
// Ignore non-HTML responses
1035+
if (strpos($this->response->getHeaderLine('Content-Type'), 'text/html') === false) {
1036+
return;
1037+
}
1038+
10341039
// This is mainly needed during testing...
10351040
if (is_string($uri)) {
10361041
$uri = new URI($uri);

0 commit comments

Comments
 (0)