receiveuntil 返回的 iterator 可以接收一个 size 参数来指定每次迭代时最多读多少。不妨试一下?
https://github.com/openresty/lua-nginx-module#tcpsockreceiveuntil
> That is, it will read that
size
of data on each invocation and will return
nil
at the last invocation (either sees the boundary pattern or meets an error)
在 2017年7月13日星期四 UTC+8下午1:20:06,李恒写道:
Hi
由于receiveuntil返回的iterator会在遇到某个规则的时候才会返回,那么有没有可能客户端利用这个原理来攻击服务器,一直发送不符合这个规则的字符串?
超时不起作用,因为这个socket确实一直在收数据的。
除增加TCP登陆验证的方法外,请问下,有没有办法处理这个问题?