'Check if all responses have X-Content-Type-Options header set
:param request: The HTTP request object.
:param response: The HTTP response object
:return: None, all results are saved in the kb.'

def grep(self, request, response):

    if (self._reports > MAX_REPORTS):
        return
    (ct_options_value, _) = response.get_headers().iget(CT_OPTIONS_HEADER, None)
    if (ct_options_value is not None):
        if (ct_options_value.strip().lower() == NOSNIFF):
            return
    self._reports += 1
    desc = 'The    URL    "%s"    returned    an    HTTP    response    without    the    recommended    HTTP    header    X-Content-Type-Options'
    desc %= response.get_url()
    i = Info('Missing    X-Content-Type-Options    header', desc, response.id, self.get_name())
    i.set_url(response.get_url())
    i[CTSniffingInfoSet.ITAG] = response.get_url().get_domain()
    self.kb_append_uniq_group(self, 'content_sniffing', i, group_klass=CTSniffingInfoSet)
