Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5100c48
)
MDL-47198 filelib: fix curl handling headers with no value
author
Davo Smith
<git@davosmith.co.uk>
Thu, 16 Oct 2014 11:52:31 +0000
(12:52 +0100)
committer
Davo Smith
<git@davosmith.co.uk>
Fri, 16 Dec 2016 13:19:48 +0000
(13:19 +0000)
lib/filelib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/filelib.php
b/lib/filelib.php
index
9b1e02c
..
b568436
100644
(file)
--- a/
lib/filelib.php
+++ b/
lib/filelib.php
@@
-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;