- Patch #28629 by chx: fixed handling of cookies in drupal_http_request().
parent
e0113d6788
commit
7d9f29aca7
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue