1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Disable redirections in HTTP based drivers

This commit is contained in:
Peter Knut
2024-01-25 13:43:18 +01:00
committed by Jakub Vrana
parent de07f00ccb
commit b2759df1f9
3 changed files with 6 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ if (isset($_GET["elastic"])) {
'content' => $content === null ? $content : json_encode($content),
'header' => 'Content-Type: application/json',
'ignore_errors' => 1, // available since PHP 5.2.10
'follow_location' => 0,
'max_redirects' => 0,
))));
if (!$file) {
$this->error = $php_errormsg;

View File

@@ -15,6 +15,8 @@ if (isset($_GET["clickhouse"])) {
'content' => $this->isQuerySelectLike($query) ? "$query FORMAT JSONCompact" : $query,
'header' => 'Content-type: application/x-www-form-urlencoded',
'ignore_errors' => 1, // available since PHP 5.2.10
'follow_location' => 0,
'max_redirects' => 0,
))));
if ($file === false) {

View File

@@ -426,6 +426,8 @@ if (isset($_GET["simpledb"])) {
'method' => 'POST', // may not fit in URL with GET
'content' => $query,
'ignore_errors' => 1, // available since PHP 5.2.10
'follow_location' => 0,
'max_redirects' => 0,
))));
if (!$file) {
$connection->error = $php_errormsg;