mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-60161 class curl in filelib: Avoid duplicate params in http header
This commit is contained in:
parent
109aa07648
commit
a2b66c7833
@ -3036,7 +3036,10 @@ class curl {
|
||||
}
|
||||
} else {
|
||||
// Remove newlines, they are not allowed in headers.
|
||||
$this->header[] = preg_replace('/[\r\n]/', '', $header);
|
||||
$newvalue = preg_replace('/[\r\n]/', '', $header);
|
||||
if (!in_array($newvalue, $this->header)) {
|
||||
$this->header[] = $newvalue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user