protected function dispatchHeaders($headersAsString)
    {
        $headers = array();

        foreach ($headersAsString as $header) {
            $headerData = $this->dispatchHeaderValue($header);

            if (is_null($headerData)) {
                continue;
            }

            $headers[$headerData['name']] = $headerData['value'];
        }

        return $headers;
    }