Skip to content
Snippets Groups Projects
Commit fe83a72e authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

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

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