Fix existing header overwritten after using MultiCurl::addCurl()

This commit is contained in:
Zach Borboa
2023-06-08 19:18:32 -07:00
parent 8217830458
commit 5427717469
2 changed files with 24 additions and 1 deletions
+4 -1
View File
@@ -863,7 +863,10 @@ class MultiCurl extends BaseCurl
$curl->childOfMultiCurl = true;
$this->queuedCurls[$curl->id] = $curl;
$curl->setHeaders($this->headers);
// Avoid overwriting any existing header.
if ($curl->getOpt(CURLOPT_HTTPHEADER) === null) {
$curl->setHeaders($this->headers);
}
}
/**