I am using Express Framework. I am trying to send very large data from server. The Client receives 200 OK status but no data. Also it gives error ERR_CONTENT_LENGTH_MISMATCH even though I am sending the content-length Header from server. The content-length of my response is 2102619.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Take a look at sending data in chunks and streams instead of everything at once.
https://medium.freecodecamp.org/node-js-streams-everything-you-need-to-know-c9141306be93 https://carlosrymer.com/using-node-streams-to-handle-large-file-uploads-24c1a0141b9c