Open matthijs-neijenhuijs opened 9 years ago
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; }
Can you please elaborate on this functionality? If you still remember since it's been years 😄
I have a api where there are duplicated header keys. Is it possible to extract the headers with ignoring parseHeaders?
I changed the function: