Git Product home page Git Product logo

lyrebird-tracking's Issues

request.data gzip逻辑处理疑问

/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())
才能够正常拦截数据并验证
想知道我们设为空的初衷是要处理什么问题?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.