Merge branch 'MDL-47198_curl_header' of git://github.com/davosmith/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2017-01-02 16:42:41 +01:00
+3 -2
View File
@@ -3056,8 +3056,9 @@ class curl {
$this->responsefinished = false;
$this->response = array();
}
list($key, $value) = explode(" ", rtrim($header, "\r\n"), 2);
$key = rtrim($key, ':');
$parts = explode(" ", rtrim($header, "\r\n"), 2);
$key = rtrim($parts[0], ':');
$value = isset($parts[1]) ? $parts[1] : null;
if (!empty($this->response[$key])) {
if (is_array($this->response[$key])) {
$this->response[$key][] = $value;