got it. 谢谢
agentzh的答复
在 2014-11-07 05:45:05,"Yichun Zhang (agentzh)" <age...@gmail.com> 写道:
>Hello!
>
>On Thu, Nov 6, 2014 at 2:40 AM, 段立国 wrote:
>> body很大,需要有限制上传速度的功能,谢谢
>>
>
>你可以使用 ngx_lua 加上一点点自己的 Lua 代码来实现上传限速。
>
>具体来说,如果你需要使用 ngx_proxy 或 ngx_fastcgi 这样的模块,则可以使用 ngx_lua 的
>access_by_lua、ngx.req.socket、ngx.sleep、ngx.req.init_body、ngx.req.append_body、ngx.req.finish_body
>这些 ngx_lua 提供的指令或 Lua API 函数。
>
>如果你本来就是使用的 content_by_lua 这样的东西,则直接在你现有的 Lua 代码里使用 ngx.req.socket 和
>ngx.sleep 这两个 API 函数就可以了。
>
>关于这些接口的细节,可以参见 ngx_lua 模块的官方文档:
>
>https://github.com/openresty/lua-nginx-module#readme
>
>Regards,
>-agentzh
>
>--
>--
>邮件来自列表“openresty”,专用于技术讨论!
>订阅: 请发空白邮件到 openresty+subscribe@googlegroups.com
>发言: 请发邮件到 openresty@googlegroups.com
>退订: 请发邮件至 openresty+unsubscribe@googlegroups.com
>归档: http://groups.google.com/group/openresty
>官网: http://openresty.org/
>仓库: https://github.com/agentzh/ngx_openresty
>教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html