gzip 压缩的请求 body 乱码
- Dominant language
- JavaScript
- Stars
- 7.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Plese fill the template when you reporting a new issue, thanks!
#### Which platform are you running AnyProxy
Mac
#### The version of the AnyProxy
4.1.2
#### Your expected behavior of AnyProxy
哔哩哔哩App,可以查看 https://dataflow.biliapi.com/log/pbmobile/unrealtime?ios 的请求 body
#### The actual behavior of AnyProxy
https://dataflow.biliapi.com/log/pbmobile/unrealtime?ios 的请求 body 乱码

Charles 虽然也有部分乱码,但关键信息可以看到

应该是因为请求头里有 `Content-Encoding :
gzip`,在规则文件里解压后输出到控制台的内容就和 Charles 一样了,请教一下怎么处理才能在UI界面正常显示
```javascript
* beforeSendRequest(requestDetail) {
zlib.gunzip(requestDetail.requestData, function (error, result) {
if (error) throw error
console.log(result)
console.log(result.toString())
})
return newRequest
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the beforeSendRequest rule and its zlib.gunzip example, then trace how the gzip-encoded request body is passed to the UI. Compare the displayed body with the decoded output for the reported Bilibili request. Done means the UI shows readable content for gzip-compressed request bodies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100