Get cookie values
matthijs-neijenhuijs opened this issue · 1 comments
matthijs-neijenhuijs commented
I have a api where there are duplicated header keys. Is it possible to extract the headers with ignoring parseHeaders?
I changed the function:
protected function parseHeaders($response, $headerSize)
{
$headers = substr($response, 0, $headerSize);
$parsedHeaders = [];
foreach (explode("\r\n",$headers) as $header)
{
if (strpos($header, ':'))
{
$nestedHeader = explode(':', $header);
$parsedHeaders[$nestedHeader[0]][] = trim($nestedHeader[1]);
}
}
return $parsedHeaders;
}
Mulkave commented
Can you please elaborate on this functionality? If you still remember since it's been years 😄