Node.js http.ServerResponse.prototype中的\u hasConnectPatch是什么
我正在connect模块中查找patch.js。以下是一些代码: var http=require('http') ,res=http.ServerResponse.prototype 如果(!res.\u hasConnectPatch){ 这里什么是_hasConnectPatch属性?它不在node.js org中API文档的描述中。Node.js http.ServerResponse.prototype中的\u hasConnectPatch是什么,node.js,Node.js,我正在connect模块中查找patch.js。以下是一些代码: var http=require('http') ,res=http.ServerResponse.prototype 如果(!res.\u hasConnectPatch){ 这里什么是_hasConnectPatch属性?它不在node.js org中API文档的描述中。 在哪里可以找到“hasConnectPatch”的描述?这是一个布尔标志,可以避免两次应用代码。patch.js提供了“header sent”标志 如
在哪里可以找到“hasConnectPatch”的描述?这是一个布尔标志,可以避免两次应用代码。
patch.js
提供了“header sent”标志
如果查看中的If
前面的注释,您将看到//仅应用一次
,并在文件末尾附近:
res._hasConnectPatch = true
它不在节点文档中,因为它是一个扩展