'åœæ¥è¯¢äž²è¿é¿æ¶, äŒè¿è¡gzipåçŒ©'

def test_long_query_str_encode_compress(self):

    query_str = ((('a=' + rand_unicode(50)) + '&b=') + rand_unicode(50))
    self.rv = self.client.get(self.url('/image/jpeg'), query_string=query_str, environ_base=env(), headers=headers())
    self.assertEqual('image/jpeg', self.rv.content_type, msg=self.dump())
    self.assertEqual(200, self.rv.status_code, msg=self.dump())
    self.assertEqual(2546631231, crc32(self.rv.data), msg=self.dump())
    with self.app.test_client() as c:
        self.rv2 = c.get(self.url('/image/jpeg'), query_string=query_str, environ_base=env(), headers=headers())
        self.assertEqual(self.zmirror.cdn_redirect_code_if_cannot_hard_rewrite, self.rv2.status_code, msg=self.dump())
        self.assertIn('/image/jpeg_{salt}z_.'.format(salt=self.zmirror.cdn_url_query_encode_salt), self.rv2.location, msg=self.dump())
    self.rv3 = self.client.get(self.rv2.location, environ_base=env(), headers=headers(user_agent=((DEFAULT_USER_AGENT + '    ') + self.zmirror.spider_ua_white_list[0])))
    self.assertEqual('image/jpeg', self.rv3.content_type, msg=self.dump())
    self.assertEqual(200, self.rv3.status_code, msg=self.dump())
    self.assertEqual(2546631231, crc32(self.rv3.data), msg=self.dump())
