[Python and HTTP] How many data compress methods at HTTP POST body?

1 points by kingname ↗ HN
I have captured a http package of an App by Charles, the headers and body of this package is:

```

    POST /v1/user/message/history?fr=544504935 HTTP/1.1 
    X-LV: 1 
    X-KV: cf6ccedf 
    X-SIGN: J8bMq6EIw7hTZzaekDiIE40Jy+s= 
    Connection: Keep-Alive 
    Charset: UTF-8 
    Expect: 100-continue 
    cookie: SESSIONID=30BB3E48-C110-CF95-BBF7-C5B948672125 
    Accept-Language: zh-CN 
    User-Agent: xxx/8.2.1 Android/1510 (Redmi 4X; Android 7.1.2; Gapps 1; zh_CN; 23; Xiaomi) 
    Content-Type: application/x-www-form-urlencoded 
    Content-Length: 109 
    Host: api.xxx.com 
    Accept-Encoding: gzip

    mzip= AgOrTaf%2BAI1OoQiapEonDg4iF8yxaY2CcUN0xL7cIEV8bP4I%2BrNDSY3AbRR2Xj6EJyT0XGPd5xSkAiuwGvawny7%2BZVmhABw%3D
```

what I am interest in is the body, which is:

```

    mzip= AgOrTaf%2BAI1OoQiapEonDg4iF8yxaY2CcUN0xL7cIEV8bP4I%2BrNDSY3AbRR2Xj6EJyT0XGPd5xSkAiuwGvawny7%2BZVmhABw%3D
```

surely, it can be decoded by urlencode first and then decoded by base64. After that, you will get a binary data.

According to my experence, some website will use zip to compress the data and then encode the binary data of this zip file by base64. while other website will use gzip to compress the data and then encode the binary data.

However, this App's http post body use neither of these two methods. And what does the `mzip` mean in the body?

Dear friend, can you suggest me how to decode this http post body ?

1 comment

[ 3.3 ms ] story [ 9.5 ms ] thread
application/x-www-form-urlencoded means this is form data.

mzip is the form field name