从 webrick 流式传输 html?
有人尝试过从 webrick 流式传输 html/text/content 吗? 我尝试将 IO 分配给响应主体,但 webrick 正在等待流先关闭。
Has anyone tried streaming html/text/content from webrick? I've tried assigning an IO to the response body, but webrick is waiting for the stream to be closed first.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
偶然发现这个链接(http://redmine.ruby-lang.org/attachments/ download/161),其中包含 webrick 补丁,
只需将 proc 作为响应主体传递即可使用,就像这样
哇!
found this link by accident (http://redmine.ruby-lang.org/attachments/download/161) which contains webrick patch
to use simply pass a proc to as the response body, like so
woot!
我建议不要使用 WEBrick 做任何事情,真的,它是垃圾。 我想说尝试一下Mongrel。
我知道这不是你的问题,这只是一些友好的建议。
I would suggest against using WEBrick for anything really, it's junk. I would say try Mongrel.
I know that wasn't your question, it's just some friendly advice.