Net/Notifier/WebSocket/Handshake.php
protected function parseHeaders($header)
    {
        $parsedHeaders = array(
            'status'  => '',
            'headers' => array()
        );

        $headers = explode("\r\n", $header);
        $parsedHeaders['status'] = array_shift($headers);

        foreach ($headers as $header) {
            list($name, $value) = explode(':', $header, 2);
            $parsedHeaders['headers'][$name] = ltrim($value);
        }

        return $parsedHeaders;
    }
protected function parseHeaders($header)
    {
        $parsedHeaders = array(
            'status'  => '',
            'headers' => array()
        );

        $headers = explode("\r\n", $header);
        $parsedHeaders['status'] = array_shift($headers);

        foreach ($headers as $header) {
            list($name, $value) = explode(':', $header, 2);
            $parsedHeaders['headers'][$name] = ltrim($value);
        }

        return $parsedHeaders;
    }
protected function parseHeaders ( $ header ) { $ parsedHeaders = array ( 'status' => '' , 'headers' => array ( ) ) ; $ headers = explode ( "\r\n" , $ header ) ; $ parsedHeaders [ 'status' ] = array_shift ( $ headers ) ; foreach ( $ headers as $ header ) { list ( $ name , $ value ) = explode ( ':' , $ header , 2 ) ; $ parsedHeaders [ 'headers' ] [ $ name ] = ltrim ( $ value ) ; } return $ parsedHeaders ; }
Parses the raw handshake header into an array of headers

@param string $header the raw handshake header.

@return array a structured array containing the following:
- <kbd>status</kbd>  - the handshake status line, and
- <kbd>headers</kbd> - an array of headers. Array keys
are the header names and array
values are the values.
Parses the raw handshake header into an array of headers