支持输出原始的gzip内容么? 支持的话可以造个http炸弹服务器
2012/3/11 agentzh
<age...@gmail.com>
On Sun, Mar 11, 2012 at 4:27 PM, lhmwzy
<lh...@gmail.com> wrote:
ngx.header["content-type"] = [[application/octet-stream]]
ngx.header["Content-disposition"]= "attachment; filename=lockingplan.txt"
local f = assert(io.open("/usr/local/openresty/nginx/html/uploadfile/6ce0b53cf6cd44b13fc3a8687f17e4a3c7ddae5d", "rb"))
local block =5000
while true do
local bytes = f:read(block)
if not bytes then break end
ngx.say(bytes)
end
Regards,
-agentzh
--
--
cheers
Yunfan Jiang
{'nick':['jyf', 'geek42'], 'im': {'gtalk': '
jyf...@gmail.com', 'irc': '
irc.freenode.net#ubuntu-cn'}, 'blog': '
http://geek42.info', 'interesting': {'teck': ['linux', 'pyt hon', 'lua', 'c', 'nosql', 'redis', 'nginx'], 'history': ['chinese history',], 'sf': [42,], 'music': ['NewAge style', 'chinese old theme', 'Any strange music']}}