Skip to content

[node] 关于 res.end 概念问题 #1

Description

@kitebear

4n 0 5 1r 1r1019u4 s5
最后一句res.end("hello world") 导致页面图片不出现
原因:
end会触发write的如果参数为data(buffer chunk or string utf-8)
end为阻塞操作,pipe为无阻塞操作,所以优先执行end,end终结了一次请求的完整过程,所以导致图片不出现
如果图片src为undefined
就会默认请求当前页面链接

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions