libcurl 7.26.0 trailing garbage

Hi folks,

I am finding some garbage in the end of every http response (JSON format) from the server when i use gzip encoding in the following way -

curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, “gzip,deflate”);

the output with garbage is -

{[status](“ok”,“response”:{“data”:{“type”:“1”,“version”:“1.0.2”,“gplay”:“xxxxxxxxxxxxx”,“itunes”:“yyyyyyyyyyyyyyyy”}}}s\236n\317.\255oC\224e\356\360\215\257\213\356\200>\230\246\227\363tSfi_\240/\3344wc\332ksR\372P\315\316jڰ1\355\255l\257\230\244\272S3cִ\221m\355\251U\353\216.X) “۳^Oۓ8N\226\311g\257H.41/\204\210)S\201S\221\3166R\263\223\201}\244D\221\350\362\245L:<YY (k\236\b-\304P\355lV\372*KZ\247x\262,\f\275.\345-o\273i2\260Q%O\247\247\355\271G\362\365\243\345P\342B\243\366W\236ew?\340\211G a\316%\316\311\374H\356?r\266ѳ/\222\226G\366\311?C\237\222eS\322ѯt\254k\252\224e\373y\351\353l\246K\366W\271U\305\343\307eV\342U\203\263n\3333Fp\273ƍ\315\3325J2l3\376m\365\266\215\335n\375\334n\334\330\310\346:q\325FGk%.\217\226fQ\207\263N\357ˇ\377<T\257\267\235\327\351M\230\215\231%u\207
G\227\276\350\347p)h?14\234\214\326\354|/\2417av䖴\2020\214\212\223\307\352v\321/\213\367\352\3779X\221u\351\245\365m8R\262Թz*;62\355\326Q\364U\352\2632Л2fy\242\375\214\273\261\246\355Uz\205\300(.Rl\260-33\376Bw\270\214,x\252\254L\232\366G\250\224B峝\310\302\311\376\310
#՛\307kQ
but the actual result should be {”status“:”ok“,”response“:{”data“:{”type“:”1“,”version“:”1.0.2“,”gplay“:”xxxxxxxxxxxxx“,”itunes“:”yyyyyyyyyyyyyyyy"}}}

If i didn’t use any encoding, i get the correct response. Why it is happening?

Please help me.

Thanks.

well, it seems no one has faced this issue before.