@@ -169,21 +169,20 @@ |
||
169 | 169 | $h = explode(':', $h, 2); |
170 | 170 | |
171 | 171 | if (isset($h[1])) { |
172 | - if (!isset($headers[$h[0]])) |
|
173 | - $headers[$h[0]] = trim($h[1]); |
|
174 | - elseif (is_array($headers[$h[0]])) { |
|
172 | + if (!isset($headers[$h[0]])) { |
|
173 | + $headers[$h[0]] = trim($h[1]); |
|
174 | + } elseif (is_array($headers[$h[0]])) { |
|
175 | 175 | $headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1]))); |
176 | - } |
|
177 | - else { |
|
176 | + } else { |
|
178 | 177 | $headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1]))); |
179 | 178 | } |
180 | 179 | $key = $h[0]; |
181 | - } |
|
182 | - else { |
|
183 | - if (substr($h[0], 0, 1) == "\t") |
|
184 | - $headers[$key] .= "\r\n\t".trim($h[0]); |
|
185 | - elseif (!$key) |
|
186 | - $headers[0] = trim($h[0]); |
|
180 | + } else { |
|
181 | + if (substr($h[0], 0, 1) == "\t") { |
|
182 | + $headers[$key] .= "\r\n\t".trim($h[0]); |
|
183 | + } elseif (!$key) { |
|
184 | + $headers[0] = trim($h[0]); |
|
185 | + } |
|
187 | 186 | } |
188 | 187 | } |
189 | 188 | return $headers; |