Commit fe83a72e authored by Dominik Hebeler's avatar Dominik Hebeler

Merge branch 'development' of https://gitlab.metager.de/open-source/MetaGer into development

parents 175dfe7a d2001374
...@@ -164,7 +164,7 @@ class RequestFetcher extends Command ...@@ -164,7 +164,7 @@ class RequestFetcher extends Command
curl_setopt($ch, CURLOPT_USERPWD, $job["username"] . ":" . $job["password"]); curl_setopt($ch, CURLOPT_USERPWD, $job["username"] . ":" . $job["password"]);
} }
if (!empty($job["headers"])) { if (!empty($job["headers"]) && sizeof($job["headers"]) > 0) {
$headers = []; $headers = [];
foreach ($job["headers"] as $key => $value) { foreach ($job["headers"] as $key => $value) {
$headers[] = $key . ":" . $value; $headers[] = $key . ":" . $value;
......
...@@ -58,11 +58,14 @@ abstract class Searchengine ...@@ -58,11 +58,14 @@ abstract class Searchengine
$this->password = $this->engine->{"http-auth-credentials"}->password; $this->password = $this->engine->{"http-auth-credentials"}->password;
} }
if ($this->engine->{"request-header"}) { if (!empty($this->engine->{"request-header"})) {
$this->headers = []; $this->headers = [];
foreach ($this->headers as $key => $value) { foreach ($this->engine->{"request-header"} as $key => $value) {
$this->headers[$key] = $value; $this->headers[$key] = $value;
} }
if (sizeof($this->headers) == 0) {
$this->headers = null;
}
} }
# Suchstring generieren # Suchstring generieren
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment