diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc index 2f6bed36b..33519b450 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -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( |