Disable redirections in HTTP based drivers

This commit is contained in:
Peter Knut
2024-01-25 13:43:18 +01:00
parent 1c5947de50
commit 9eb4d00564
3 changed files with 11 additions and 5 deletions

View File

@@ -425,7 +425,9 @@ if (isset($_GET["simpledb"])) {
$file = @file_get_contents((preg_match('~^https?://~', $host) ? $host : "http://$host"), false, stream_context_create(array('http' => array(
'method' => 'POST', // may not fit in URL with GET
'content' => $query,
'ignore_errors' => 1, // available since PHP 5.2.10
'ignore_errors' => 1,
'follow_location' => 0,
'max_redirects' => 0,
))));
if (!$file) {
$connection->error = $php_errormsg;