Commit 7d9f29ac authored by Dries's avatar Dries

- Patch #28629 by chx: fixed handling of cookies in drupal_http_request().

parent e0113d67
......@@ -395,7 +395,14 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
// Parse headers.
while ($line = trim(array_shift($headers))) {
list($header, $value) = explode(':', $line, 2);
$result->headers[$header] = trim($value);
if (isset($result->headers[$header]) && $header == 'Set-Cookie') {
// RFC 2109: the Set-Cookie response header comprises the token Set-
// Cookie:, followed by a comma-separated list of one or more cookies.
$result->headers[$header] .= ','. trim($value);
}
else {
$result->headers[$header] = trim($value);
}
}
$responses = array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment