Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get cookie values #16

Open
matthijs-neijenhuijs opened this issue May 14, 2015 · 1 comment
Open

Get cookie values #16

matthijs-neijenhuijs opened this issue May 14, 2015 · 1 comment

Comments

@matthijs-neijenhuijs
Copy link

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
Copy link
Member

Mulkave commented Nov 2, 2017

Can you please elaborate on this functionality? If you still remember since it's been years 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants