Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request.data gzip逻辑处理疑问 #8

Open
mengdg opened this issue Aug 8, 2019 · 1 comment
Open

request.data gzip逻辑处理疑问 #8

mengdg opened this issue Aug 8, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@mengdg
Copy link

mengdg commented Aug 8, 2019

/lyrebird_tracking/tracking.py 29行
#获取配置文件的目标host列表,取自于config中的target if hostname in app_context.config.get('target'): # 判断是否为gzip类型,若是进行解压缩处理 if 'Content-Encoding' in handler_context.request.headers and handler_context.request.headers.get( 'Content-Encoding') == 'gzip': reqs_data = json.loads(gzip.decompress(handler_context.request.data).decode()) else: reqs_data = []
没有特别明白非gzip的data数据为什么赋值为[ ]

我这边调试过程中将[ ]修改为reqs_data = json.loads(handler_context.request.data.decode())
才能够正常拦截数据并验证
想知道我们设为空的初衷是要处理什么问题?

@zhaoye zhaoye added the bug Something isn't working label Aug 9, 2019
@zhaoye
Copy link
Member

zhaoye commented Aug 9, 2019

十分感谢。这个应该是一个bug。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants