private function extractHeaders($headers) {
        if (is_array($headers) === false) {
            throw new \InvalidArgumentException('Headers must be an array');
        }

        $headers_values = array();
        foreach ($headers as $headerName) {
            $headerObj = $this->getRequest()->getHeader($headerName);
            if ($headerObj instanceof \Zend\Http\Header\HeaderInterface) {
                $value = $headerObj->getFieldValue();

                // \Zend\Http\Header\ContentLength has a bug in initialization
                // if header value is 0 then it sets value as null
                if (is_null($value) && $headerObj instanceof \Zend\Http\Header\ContentLength) {
                    $value = 0;
                }

                if (trim($value) === '') {
                    throw new Exception\BadHeader($headerName . ' can\'t be empty');
                }

                $headers_values[$headerName] = $value;
            }
        }

        return $headers_values;
    }