TSG-20527 http2解析层支持zstd编解码
This commit is contained in:
@@ -337,13 +337,13 @@ TEST(UI_TEST_INFLATE_GZIP, inflate_01)
|
||||
{
|
||||
char *uncompr = NULL;
|
||||
int ret = 0, uncompr_len = 0;
|
||||
struct z_stream_st *inflate = NULL;
|
||||
ret = inflate_read(ut_gip_01, sizeof(ut_gip_01), &uncompr, &uncompr_len, &inflate, 2);
|
||||
struct http2_codec_ctx *inflate = NULL;
|
||||
ret = http2_decompress_stream(ut_gip_01, sizeof(ut_gip_01), &uncompr, &uncompr_len, &inflate, 2);
|
||||
|
||||
EXPECT_EQ(ret, Z_STREAM_END);
|
||||
EXPECT_EQ(uncompr_len, sizeof(ut_ungip_01));
|
||||
EXPECT_EQ(memcmp(uncompr, ut_ungip_01, sizeof(ut_ungip_01)), 0);
|
||||
inflate_finished(&inflate);
|
||||
http2_decompress_finished(&inflate);
|
||||
|
||||
free(uncompr);
|
||||
uncompr = NULL;
|
||||
@@ -351,17 +351,17 @@ TEST(UI_TEST_INFLATE_GZIP, inflate_01)
|
||||
|
||||
TEST(UI_TEST_INFLATE_GZIP, inflate_02)
|
||||
{
|
||||
struct z_stream_st *inflate = NULL;
|
||||
struct http2_codec_ctx *inflate = NULL;
|
||||
int ret = 0, half = 0;
|
||||
int size = sizeof(ut_gip_01);
|
||||
half = size / 2;
|
||||
|
||||
char *uncompr1 = NULL; int uncompr_len1 = 0;
|
||||
ret = inflate_read(ut_gip_01, half, &uncompr1, &uncompr_len1, &inflate, 2);
|
||||
ret = http2_decompress_stream(ut_gip_01, half, &uncompr1, &uncompr_len1, &inflate, 2);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
|
||||
char *uncompr2 = NULL; int uncompr_len2 = 0;
|
||||
ret = inflate_read(ut_gip_01 + half, size - half, &uncompr2, &uncompr_len2, &inflate, 2);
|
||||
ret = http2_decompress_stream(ut_gip_01 + half, size - half, &uncompr2, &uncompr_len2, &inflate, 2);
|
||||
EXPECT_EQ(ret, Z_STREAM_END);
|
||||
|
||||
char uncompr[1024] = {0};
|
||||
@@ -370,7 +370,7 @@ TEST(UI_TEST_INFLATE_GZIP, inflate_02)
|
||||
EXPECT_EQ(uncompr_len1 + uncompr_len2, sizeof(ut_ungip_01));
|
||||
EXPECT_EQ(memcmp(uncompr, ut_ungip_01, sizeof(ut_ungip_01)), 0);
|
||||
|
||||
inflate_finished(&inflate);
|
||||
http2_decompress_finished(&inflate);
|
||||
free(uncompr1);
|
||||
uncompr1 = NULL;
|
||||
free(uncompr2);
|
||||
@@ -384,23 +384,23 @@ TEST(UI_TEST_DEFLATE_GZIP, deflate_01)
|
||||
struct evbuffer * buf = evbuffer_new();
|
||||
int size = sizeof(ut_ungip_01);
|
||||
|
||||
struct z_stream_st *deflate = NULL;
|
||||
ret = deflate_write(&deflate, ut_ungip_01, size, buf, 2, 1);
|
||||
struct http2_codec_ctx *deflate = NULL;
|
||||
ret = http2_compress_stream(&deflate, ut_ungip_01, size, buf, 2, 1);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
deflate_finished(&deflate);
|
||||
http2_compress_finished(&deflate);
|
||||
|
||||
dest = evbuffer_pullup(buf, -1);
|
||||
dlen = evbuffer_get_length(buf);
|
||||
|
||||
char *uncompr = NULL;
|
||||
int uncompr_len = 0;
|
||||
struct z_stream_st *inflate = NULL;
|
||||
ret = inflate_read(dest, dlen, &uncompr, &uncompr_len, &inflate, 2);
|
||||
struct http2_codec_ctx *inflate = NULL;
|
||||
ret = http2_decompress_stream(dest, dlen, &uncompr, &uncompr_len, &inflate, 2);
|
||||
EXPECT_EQ(ret, Z_STREAM_END);
|
||||
EXPECT_EQ(uncompr_len, sizeof(ut_ungip_01));
|
||||
EXPECT_EQ(memcmp(uncompr, ut_ungip_01, sizeof(ut_ungip_01)), 0);
|
||||
|
||||
inflate_finished(&inflate);
|
||||
http2_decompress_finished(&inflate);
|
||||
free(uncompr);
|
||||
uncompr = NULL;
|
||||
evbuffer_free(buf);
|
||||
@@ -415,31 +415,31 @@ TEST(UI_TEST_DEFLATE_GZIP, deflate_02)
|
||||
half = size / 2;
|
||||
|
||||
struct evbuffer * buf = evbuffer_new();
|
||||
struct z_stream_st *deflate = NULL;
|
||||
struct http2_codec_ctx *deflate = NULL;
|
||||
/* First frag */
|
||||
ret = deflate_write(&deflate, ut_ungip_01, half, buf, 2, 0);
|
||||
ret = http2_compress_stream(&deflate, ut_ungip_01, half, buf, 2, 0);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
|
||||
/* Last frag */
|
||||
ret = deflate_write(&deflate, ut_ungip_01 + half, size - half, buf, 2, 0);
|
||||
ret = http2_compress_stream(&deflate, ut_ungip_01 + half, size - half, buf, 2, 0);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
|
||||
/* End frag */
|
||||
ret = deflate_write(&deflate, NULL, 0, buf, 2, 1);
|
||||
ret = http2_compress_stream(&deflate, NULL, 0, buf, 2, 1);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
deflate_finished(&deflate);
|
||||
http2_compress_finished(&deflate);
|
||||
|
||||
dest = evbuffer_pullup(buf, -1);
|
||||
dlen = evbuffer_get_length(buf);
|
||||
|
||||
char *uncompr = NULL;
|
||||
int uncompr_len = 0;
|
||||
struct z_stream_st *inflate = NULL;
|
||||
ret = inflate_read(dest, dlen, &uncompr, &uncompr_len, &inflate, 2);
|
||||
struct http2_codec_ctx *inflate = NULL;
|
||||
ret = http2_decompress_stream(dest, dlen, &uncompr, &uncompr_len, &inflate, 2);
|
||||
EXPECT_EQ(ret, Z_STREAM_END);
|
||||
EXPECT_EQ(uncompr_len, sizeof(ut_ungip_01));
|
||||
EXPECT_EQ(memcmp(uncompr, ut_ungip_01, sizeof(ut_ungip_01)), 0);
|
||||
inflate_finished(&inflate);
|
||||
http2_decompress_finished(&inflate);
|
||||
|
||||
free(uncompr);
|
||||
uncompr = NULL;
|
||||
@@ -453,22 +453,22 @@ TEST(UI_TEST_DEFLATE_BR, deflate_01)
|
||||
struct evbuffer * buf = evbuffer_new();
|
||||
int size = sizeof(ut_ungip_01);
|
||||
|
||||
struct z_stream_st *deflate = NULL;
|
||||
ret = deflate_write(&deflate, ut_ungip_01, size, buf, HTTP2_CONTENT_ENCODING_BR, 1);
|
||||
struct http2_codec_ctx *deflate = NULL;
|
||||
ret = http2_compress_stream(&deflate, ut_ungip_01, size, buf, HTTP2_CONTENT_ENCODING_BR, 1);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
deflate_finished(&deflate);
|
||||
http2_compress_finished(&deflate);
|
||||
|
||||
dest = evbuffer_pullup(buf, -1);
|
||||
dlen = evbuffer_get_length(buf);
|
||||
|
||||
char *uncompr = NULL;
|
||||
int uncompr_len = 0;
|
||||
struct z_stream_st *inflate = NULL;
|
||||
ret = inflate_read(dest, dlen, &uncompr, &uncompr_len, &inflate, HTTP2_CONTENT_ENCODING_BR);
|
||||
struct http2_codec_ctx *inflate = NULL;
|
||||
ret = http2_decompress_stream(dest, dlen, &uncompr, &uncompr_len, &inflate, HTTP2_CONTENT_ENCODING_BR);
|
||||
EXPECT_EQ(ret, Z_STREAM_END);
|
||||
EXPECT_EQ(uncompr_len, sizeof(ut_ungip_01));
|
||||
EXPECT_EQ(memcmp(uncompr, ut_ungip_01, sizeof(ut_ungip_01)), 0);
|
||||
inflate_finished(&inflate);
|
||||
http2_decompress_finished(&inflate);
|
||||
|
||||
free(uncompr);
|
||||
uncompr = NULL;
|
||||
@@ -484,37 +484,272 @@ TEST(UI_TEST_DEFLATE_BR, deflate_02)
|
||||
half = size / 2;
|
||||
|
||||
struct evbuffer * buf = evbuffer_new();
|
||||
struct z_stream_st *deflate = NULL;
|
||||
struct http2_codec_ctx *deflate = NULL;
|
||||
/* First frag */
|
||||
ret = deflate_write(&deflate, ut_ungip_01, half, buf, HTTP2_CONTENT_ENCODING_BR, 0);
|
||||
ret = http2_compress_stream(&deflate, ut_ungip_01, half, buf, HTTP2_CONTENT_ENCODING_BR, 0);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
|
||||
/* Last frag */
|
||||
ret = deflate_write(&deflate, ut_ungip_01 + half, size - half, buf, HTTP2_CONTENT_ENCODING_BR, 0);
|
||||
ret = http2_compress_stream(&deflate, ut_ungip_01 + half, size - half, buf, HTTP2_CONTENT_ENCODING_BR, 0);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
|
||||
/* End frag */
|
||||
ret = deflate_write(&deflate, NULL, 0, buf, HTTP2_CONTENT_ENCODING_BR, 1);
|
||||
ret = http2_compress_stream(&deflate, NULL, 0, buf, HTTP2_CONTENT_ENCODING_BR, 1);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
deflate_finished(&deflate);
|
||||
http2_compress_finished(&deflate);
|
||||
|
||||
dest = evbuffer_pullup(buf, -1);
|
||||
dlen = evbuffer_get_length(buf);
|
||||
|
||||
char *uncompr = NULL;
|
||||
int uncompr_len = 0;
|
||||
struct z_stream_st *inflate = NULL;
|
||||
ret = inflate_read(dest, dlen, &uncompr, &uncompr_len, &inflate, HTTP2_CONTENT_ENCODING_BR);
|
||||
struct http2_codec_ctx *inflate = NULL;
|
||||
ret = http2_decompress_stream(dest, dlen, &uncompr, &uncompr_len, &inflate, HTTP2_CONTENT_ENCODING_BR);
|
||||
EXPECT_EQ(ret, Z_STREAM_END);
|
||||
EXPECT_EQ(uncompr_len, sizeof(ut_ungip_01));
|
||||
EXPECT_EQ(memcmp(uncompr, ut_ungip_01, sizeof(ut_ungip_01)), 0);
|
||||
inflate_finished(&inflate);
|
||||
http2_decompress_finished(&inflate);
|
||||
|
||||
free(uncompr);
|
||||
uncompr = NULL;
|
||||
evbuffer_free(buf);
|
||||
}
|
||||
|
||||
TEST(UI_TEST_INFLATE_ZSTD, Decompress_Facebook_Manifest)
|
||||
{
|
||||
char *output = NULL;
|
||||
int ret = 0, output_len = 0;
|
||||
struct http2_codec_ctx *codec_ctx = NULL;
|
||||
ret = http2_decompress_stream(facebook_response_zstd_body, sizeof(facebook_response_zstd_body), &output, &output_len, &codec_ctx, HTTP2_CONTENT_ENCODING_ZSTD);
|
||||
printf("output = %s\n", output);
|
||||
EXPECT_EQ(ret, 1);
|
||||
EXPECT_EQ(output_len, strlen(facebook_response_text_body));
|
||||
EXPECT_EQ(memcmp(output, facebook_response_text_body, strlen(facebook_response_text_body)), 0);
|
||||
http2_decompress_finished(&codec_ctx);
|
||||
free(output);
|
||||
output = NULL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
TEST(UI_TEST_INFLATE_ZSTD, Decompress_Facebook_Index)
|
||||
{
|
||||
char *output = NULL;
|
||||
int ret = 0, output_len = 0;
|
||||
struct http2_codec_ctx *codec_ctx = NULL;
|
||||
ret = http2_decompress_stream(facebook_index_zstd_body, sizeof(facebook_index_zstd_body), &output, &output_len, &codec_ctx, HTTP2_CONTENT_ENCODING_ZSTD);
|
||||
printf("output = %s\n", output);
|
||||
EXPECT_EQ(ret, 1);
|
||||
//EXPECT_EQ(output_len, strlen(facebook_response_text_body));
|
||||
//EXPECT_EQ(memcmp(output, facebook_response_text_body, strlen(facebook_response_text_body)), 0);
|
||||
http2_compress_finished(&codec_ctx);
|
||||
free(output);
|
||||
output = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST(UI_TEST_INFLATE_ZSTD, Compress_AND_Decompress_Facebook_Manifest)
|
||||
{
|
||||
unsigned char *encode_str = NULL;
|
||||
int ret = 0, encode_len = 0;
|
||||
struct evbuffer *encode_buf = evbuffer_new();
|
||||
int input_len = strlen(facebook_response_text_body);
|
||||
|
||||
struct http2_codec_ctx *codec_ctx_ecode = NULL;
|
||||
ret = http2_compress_stream(&codec_ctx_ecode, (const uint8_t *)facebook_response_text_body, input_len, encode_buf, HTTP2_CONTENT_ENCODING_ZSTD, 1);
|
||||
EXPECT_EQ(ret, Z_OK);
|
||||
http2_compress_finished(&codec_ctx_ecode);
|
||||
|
||||
encode_str = evbuffer_pullup(encode_buf, -1);
|
||||
encode_len = evbuffer_get_length(encode_buf) + 1;
|
||||
|
||||
char *output = NULL;
|
||||
int output_len = 0;
|
||||
struct http2_codec_ctx *codec_ctx_decode = NULL;
|
||||
ret = http2_decompress_stream(encode_str, encode_len, &output, &output_len, &codec_ctx_decode, HTTP2_CONTENT_ENCODING_ZSTD);
|
||||
printf("output = %s\n", output);
|
||||
|
||||
EXPECT_EQ(ret, 1);
|
||||
EXPECT_EQ(output_len, strlen(facebook_response_text_body));
|
||||
EXPECT_EQ(memcmp(output, facebook_response_text_body, strlen(facebook_response_text_body)), 0);
|
||||
http2_decompress_finished(&codec_ctx_decode);
|
||||
|
||||
free(output);
|
||||
output = NULL;
|
||||
evbuffer_free(encode_buf);
|
||||
}
|
||||
|
||||
TEST(UI_TEST_INFLATE_ZSTD, Compress_Facebook_Manifest_MORE_TIMES)
|
||||
{
|
||||
unsigned char *encode_str = NULL;
|
||||
int ret = 0, half_len = 0, encode_len = 0;
|
||||
|
||||
int text_len = strlen(facebook_response_text_body);
|
||||
half_len = text_len / 2;
|
||||
|
||||
struct evbuffer *encode_buf = evbuffer_new();
|
||||
struct http2_codec_ctx *codec_ctx = NULL;
|
||||
/* First frag */
|
||||
ret = http2_compress_stream(&codec_ctx, (const uint8_t *)facebook_response_text_body, half_len, encode_buf, HTTP2_CONTENT_ENCODING_ZSTD, 0);
|
||||
EXPECT_EQ(ret, 0);
|
||||
/* Last frag */
|
||||
ret = http2_compress_stream(&codec_ctx, (const uint8_t *)facebook_response_text_body + half_len, text_len - half_len, encode_buf, HTTP2_CONTENT_ENCODING_ZSTD, 0);
|
||||
EXPECT_EQ(ret, 0);
|
||||
/* End frag */
|
||||
ret = http2_compress_stream(&codec_ctx, NULL, 0, encode_buf, HTTP2_CONTENT_ENCODING_ZSTD, 1);
|
||||
EXPECT_EQ(ret, 0);
|
||||
http2_compress_finished(&codec_ctx);
|
||||
|
||||
encode_str = evbuffer_pullup(encode_buf, -1);
|
||||
encode_len = evbuffer_get_length(encode_buf);
|
||||
printf("encode_len = %d\n", encode_len);
|
||||
|
||||
char *output = NULL;
|
||||
int output_len = 0;
|
||||
ret = http2_decompress_stream(encode_str, encode_len, &output, &output_len, &codec_ctx, HTTP2_CONTENT_ENCODING_ZSTD);
|
||||
printf("output = %s, ret =%d\n", output, ret);
|
||||
EXPECT_EQ(ret, 1);
|
||||
EXPECT_EQ(output_len, strlen(facebook_response_text_body));
|
||||
EXPECT_EQ(memcmp(output, facebook_response_text_body, strlen(facebook_response_text_body)), 0);
|
||||
http2_decompress_finished(&codec_ctx);
|
||||
|
||||
free(output);
|
||||
output = NULL;
|
||||
evbuffer_free(encode_buf);
|
||||
}
|
||||
|
||||
static int read_file(const char *filename, char **input)
|
||||
{
|
||||
FILE* fp=NULL;
|
||||
struct stat file_info;
|
||||
stat(filename, &file_info);
|
||||
size_t input_sz=file_info.st_size;
|
||||
|
||||
fp=fopen(filename,"r");
|
||||
if(fp==NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
*input=(char*)malloc(input_sz);
|
||||
fread(*input,1,input_sz,fp);
|
||||
fclose(fp);
|
||||
return input_sz;
|
||||
}
|
||||
|
||||
static int write_file(const char *outfile, char *output, int out_len)
|
||||
{
|
||||
FILE* fp=NULL;
|
||||
fp=fopen(outfile,"wb");
|
||||
if(fp==NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
size_t writtenSize = fwrite(output, 1, out_len, fp);
|
||||
fclose(fp);
|
||||
return writtenSize;
|
||||
}
|
||||
|
||||
TEST(UI_TEST_INFLATE_ZSTD, Compress_Manual_Html_Simple)
|
||||
{
|
||||
int ret=0, encode_len=0;
|
||||
char *input=0; size_t input_sz=0;
|
||||
unsigned char *encode_str = NULL;
|
||||
|
||||
struct http2_codec_ctx *codec_ctx = NULL;
|
||||
|
||||
struct evbuffer *encode_buf = evbuffer_new();
|
||||
|
||||
const char* filename="./zstd_manual_simple.html";
|
||||
const char *outfile="./zstd_manual_simple_test.html";
|
||||
input_sz = read_file(filename, &input);
|
||||
if(input_sz !=0 || input != NULL)
|
||||
{
|
||||
ret = http2_compress_stream(&codec_ctx, (const uint8_t *)input, input_sz, encode_buf, HTTP2_CONTENT_ENCODING_ZSTD, 1);
|
||||
EXPECT_EQ(ret, 0);
|
||||
http2_compress_finished(&codec_ctx);
|
||||
|
||||
encode_str = evbuffer_pullup(encode_buf, -1);
|
||||
encode_len = evbuffer_get_length(encode_buf);
|
||||
printf("encode_len = %d\n", encode_len);
|
||||
|
||||
char *output = NULL;
|
||||
int output_len = 0;
|
||||
ret = http2_decompress_stream(encode_str, encode_len, &output, &output_len, &codec_ctx, HTTP2_CONTENT_ENCODING_ZSTD);
|
||||
printf("output_len = %d, ret =%d\n", output_len, ret);
|
||||
write_file(outfile, output, output_len);
|
||||
http2_decompress_finished(&codec_ctx);
|
||||
|
||||
free(input);
|
||||
free(output);
|
||||
evbuffer_free(encode_buf);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UI_TEST_INFLATE_ZSTD, Compress_Manual_Html_Large)
|
||||
{
|
||||
int ret=0, encode_len=0;
|
||||
char *input=0; size_t input_sz=0;
|
||||
unsigned char *encode_str = NULL;
|
||||
|
||||
struct http2_codec_ctx *codec_ctx = NULL;
|
||||
|
||||
struct evbuffer *encode_buf = evbuffer_new();
|
||||
|
||||
const char *inputfile="./zstd_manual_large.html";
|
||||
const char *outfile="./zstd_manual_large_test.html";
|
||||
input_sz = read_file(inputfile, &input);
|
||||
if(input_sz !=0 || input != NULL)
|
||||
{
|
||||
ret = http2_compress_stream(&codec_ctx, (const uint8_t *)input, input_sz, encode_buf, HTTP2_CONTENT_ENCODING_ZSTD, 1);
|
||||
EXPECT_EQ(ret, 0);
|
||||
http2_compress_finished(&codec_ctx);
|
||||
|
||||
encode_str = evbuffer_pullup(encode_buf, -1);
|
||||
encode_len = evbuffer_get_length(encode_buf);
|
||||
printf("encode_len = %d\n", encode_len);
|
||||
|
||||
char *output = NULL;
|
||||
int output_len = 0;
|
||||
ret = http2_decompress_stream(encode_str, encode_len, &output, &output_len, &codec_ctx, HTTP2_CONTENT_ENCODING_ZSTD);
|
||||
printf("output_len = %d, ret =%d\n", output_len, ret);
|
||||
write_file(outfile, output, output_len);
|
||||
http2_decompress_finished(&codec_ctx);
|
||||
|
||||
free(input);
|
||||
free(output);
|
||||
evbuffer_free(encode_buf);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
TEST(UI_TEST_INFLATE_ZSTD, Decompress_Facebook_Manifest_Half)
|
||||
{
|
||||
struct http2_codec_ctx *codec_ctx = NULL;
|
||||
int ret = 0, half = 0;
|
||||
int size = sizeof(facebook_response_zstd_body);
|
||||
half = size / 2;
|
||||
|
||||
char *output1 = NULL; int output_len1 = 0;
|
||||
ret = http2_decompress_stream(ut_gip_01, half, &output1, &output_len1, &codec_ctx, HTTP2_CONTENT_ENCODING_ZSTD);
|
||||
EXPECT_EQ(ret, 1);
|
||||
|
||||
char *output2 = NULL; int output_len2 = 0;
|
||||
ret = http2_decompress_stream(ut_gip_01 + half, size - half, &output2, &output_len2, &codec_ctx, HTTP2_CONTENT_ENCODING_ZSTD);
|
||||
EXPECT_EQ(ret, 1);
|
||||
|
||||
char output[4096] = {0};
|
||||
memcpy(output, output1, output_len1);
|
||||
memcpy(output + output_len1, output2, output_len2);
|
||||
EXPECT_EQ(output_len1 + output_len2, strlen(facebook_response_text_body));
|
||||
EXPECT_EQ(memcmp(output, facebook_response_text_body, strlen(facebook_response_text_body)), 0);
|
||||
|
||||
http2_compress_finished(&codec_ctx);
|
||||
free(output1);
|
||||
output1 = NULL;
|
||||
free(output2);
|
||||
output2 = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
@@ -2279,6 +2279,51 @@ unsigned char ut_ungip_01[] = {
|
||||
0x6c, 0x66, 0x6a
|
||||
};
|
||||
|
||||
unsigned char facebook_response_zstd_body[] = {
|
||||
0x28, 0xb5, 0x2f, 0xfd, 0x00, 0x58, 0xf4, 0x0f, 0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0x98, 0xeb, 0x5a, 0xfb, 0xd2, 0x95, 0xbe, 0x63, 0x1d, 0xb6, 0x64, 0xca,
|
||||
0xda, 0x3d, 0xcb, 0x5a, 0x72, 0x7d, 0xd5, 0x98, 0x7a, 0xd7, 0x35, 0x50, 0x4e, 0xd6, 0xd0, 0xf2,
|
||||
0xec, 0xd3, 0x60, 0xb5, 0x2d, 0x46, 0x5d, 0x32, 0x89, 0x48, 0x20, 0x02, 0xca, 0xe4, 0x31, 0x81,
|
||||
0xbe, 0xee, 0x1e, 0xab, 0xed, 0x64, 0x5b, 0x16, 0x9b, 0xf4, 0x8e, 0x28, 0x20, 0x60, 0x02, 0x09,
|
||||
0xa6, 0x8a, 0xd4, 0x03, 0xda, 0xa3, 0xc4, 0x0f, 0xc9, 0xe8, 0x6d, 0x60, 0x00, 0x65, 0xd0, 0x10,
|
||||
0x95, 0x26, 0x20, 0x11, 0xc2, 0xf4, 0x22, 0x75, 0xf7, 0x36, 0xcc, 0xb2, 0xc2, 0xc7, 0x8e, 0xd0,
|
||||
0x76, 0x23, 0x47, 0x0f, 0x90, 0x99, 0x7a, 0xf9, 0x3c, 0x52, 0x0b, 0xe2, 0x25, 0x1f, 0x21, 0x4e,
|
||||
0x1f, 0x6f, 0x01, 0x80, 0xe2, 0x14, 0x6d, 0x43, 0x3d, 0xd9, 0x8a, 0xcf, 0x39, 0x04, 0xc8, 0x18,
|
||||
0xb9, 0xf8, 0x29, 0xb9, 0x1e, 0x08, 0xb6, 0xb0, 0x2b, 0xb6, 0x06, 0x9b, 0x76, 0x2e, 0xa8, 0x3e,
|
||||
0xdc, 0x1f, 0x0e, 0xeb, 0xe2, 0x76, 0xb4, 0xac, 0xb0, 0x5b, 0x0e, 0xda, 0x00, 0xe3, 0xc3, 0x08,
|
||||
0xb1, 0x95, 0xfc, 0x1c, 0xda, 0x97, 0x07, 0x01, 0x00, 0x00
|
||||
};
|
||||
|
||||
const char *facebook_response_text_body = "{\"gcm_sender_id\":\"15057814354\",\"gcm_user_visible_only\":true,\"edge_side_panel\":\
|
||||
{\"preferred_width\":376},\"short_name\":\"Facebook\",\"name\":\"Facebook\",\"start_url\":\"\\/?ref=homescreenpwa\",\
|
||||
\"display\":\"minimal-ui\",\"background_color\":\"#FFFFFF\",\"theme_color\":\"#1877F2\",\"icons\":[{\"src\":\"https:\\/\\/static.xx.fbcdn.net\\/rsrc.php\\/v3\\/y0\\/r\\/eFZD1KABzRA.png\",\
|
||||
\"sizes\":\"192x192\",\"type\":\"image\\/png\"},{\"src\":\"https:\\/\\/static.xx.fbcdn.net\\/rsrc.php\\/v3\\/yd\\/r\\/DeNyZD1Vj3q.png\",\"sizes\":\"512x512\",\"type\":\"image\\/png\"}],\
|
||||
\"widgets\":[{\"name\":\"Facebook\",\"description\":\"Facebook\",\"short_name\":\"Facebook\",\"tag\":\"fb_widget\",\"type\":\"application\\/json\",\"update\":100,\"icons\"\
|
||||
:[{\"src\":\"https:\\/\\/static.xx.fbcdn.net\\/rsrc.php\\/v3\\/y0\\/r\\/eFZD1KABzRA.png\",\"sizes\":\"192x192\"}],\"screenshots\":[{\"src\":\"https:\\/\\/static.xx.fbcdn.net\\/rs\
|
||||
rc.php\\/v3\\/yT\\/r\\/mqlhqxHpT-X.png\",\"sizes\":\"464x478\",\"label\":\"Widget Screenshot\"}],\"template\":\"dummy\",\"data\":\"\\/dummy.json\",\"ms_ac_template\":\"\\/dummy.json\"}],\
|
||||
\"related_applications\":[{\"platform\":\"play\",\"id\":\"com.facebook.katana\"},{\"platform\":\"play\",\"id\":\"com.facebook.lite\"},{\"platform\":\"play\",\"id\":\"com.facebook.orca\"},\
|
||||
{\"platform\":\"play\",\"id\":\"com.facebook.mlite\"}],\"prefer_related_applications\":false}";
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user