diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-08-22 20:24:53 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-08-22 20:24:53 +0000 |
commit | 7d9f29aca734b3040ca5f7399782b997ef3eb2b4 (patch) | |
tree | 99ac0f6f9eed313736e5bff44ba49c75f49099d9 /includes | |
parent | e0113d678827b78fdf7d6e31deebb948bba06f07 (diff) | |
download | brdo-7d9f29aca734b3040ca5f7399782b997ef3eb2b4.tar.gz brdo-7d9f29aca734b3040ca5f7399782b997ef3eb2b4.tar.bz2 |
- Patch #28629 by chx: fixed handling of cookies in drupal_http_request().
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( |