Piwik\Http::parseHeaderLine PHP Method

parseHeaderLine() private static method

Utility function, parses an HTTP header line into key/value & sets header array with them.
private static parseHeaderLine ( array &$headers, string $line )
$headers array
$line string
    private static function parseHeaderLine(&$headers, $line)
    {
        $parts = explode(':', $line, 2);
        if (count($parts) == 1) {
            return;
        }
        list($name, $value) = $parts;
        $headers[trim($name)] = trim($value);
    }