From aa5a2fbdbdf734507b5da641d7b766f52adaad1f Mon Sep 17 00:00:00 2001 From: loveshell <82163261@qq.com> Date: Wed, 9 Apr 2014 10:46:41 +0800 Subject: [PATCH] fix while boundary --- waf.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/waf.lua b/waf.lua index 802a156..64adeac 100644 --- a/waf.lua +++ b/waf.lua @@ -37,16 +37,16 @@ elseif PostCheck then return end ngx.req.append_body(data) + gx.req.finish_body() + if body(data) then + return true + end size = size + len(data) local less = content_length - size if less < chunk_size then chunk_size = less end end - ngx.req.finish_body() - if body(data) then - return true - end else ngx.req.read_body() local args = ngx.req.get_post_args()