From db25d1acc67342641c991aeabbe668a5c70595d4 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Wed, 23 Jul 2014 14:04:32 +0800 Subject: [PATCH] update history --- HISTORY.md | 1 + examples/simpleweb.lua | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 615bc346..c5dcfadc 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ Dev version * Simplify clientsocket lib * mongo driver support replica set * config file support read from ENV +* add simple httpd (see examples/simpleweb.lua) v0.4.2 (2014-7-14) ----------- diff --git a/examples/simpleweb.lua b/examples/simpleweb.lua index bfd247eb..4bb175d0 100644 --- a/examples/simpleweb.lua +++ b/examples/simpleweb.lua @@ -11,7 +11,8 @@ if mode == "agent" then skynet.start(function() skynet.dispatch("lua", function (_,_,id) socket.start(id) - local code, url, method, header, body = httpd.read_request(sockethelper.readfunc(id)) + -- limit request body size to 8192 (you can pass nil to unlimit) + local code, url, method, header, body = httpd.read_request(sockethelper.readfunc(id), 8192) if code then if code ~= 200 then httpd.write_response(sockethelper.writefunc(id), code)