Skip to content

【enhancement】拦截事件可以优化writable stream数据是否被重写的判断逻辑 #1

@alanchenchen

Description

@alanchenchen

当前是通过判断拦截事件的字符串来正则匹配write, end,和pipe等方法检测,但是存在很多问题:

  • 使用者注释后,正则还是会匹配,只能通过优化正则规则解决
  • 如果使用者调用了write,但是未使用end,http response流依旧未成功返回

优化如下:

  • 使用stream模块,writable stream的writableFinished属性来判断,当前http response流是否不需要插件手动返回原有的服务器数据

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions