':see: https://github.com/andresriancho/w3af/issues/4402'

def test_get_clear_text_issue_4402(self):

    test_file_path = 'core/data/url/tests/data/encoding_4402.php'
    test_file = os.path.join(ROOT_PATH, test_file_path)
    body = file(test_file, 'rb').read()
    sample_encodings = [encoding for (_, (_, encoding)) in TEST_RESPONSES.iteritems()]
    sample_encodings.extend(['', 'utf-8'])
    for encoding in sample_encodings:
        encoding_header = ('text/html;    charset=%s' % encoding)
        headers = Headers([('Content-Type', encoding_header)])
        r = build_http_response(self.url, body, headers)
        p = SGMLParser(r)
        p.parse()
        p.get_clear_text_body()
