public static function matchHeaders(Request $first, Request $second)
    {
        // Use array_filter to ignore headers which are null.

        return array_filter($first->getHeaders()) === array_filter($second->getHeaders());
    }