From 8579acaece04a06cd05fc628e8737abda3836330 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 8 Mar 2017 12:49:37 +0100 Subject: Allow 10MB of POST body. --- src/catlfish_web.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/catlfish_web.erl b/src/catlfish_web.erl index 52441fc..8cf3092 100644 --- a/src/catlfish_web.erl +++ b/src/catlfish_web.erl @@ -4,6 +4,9 @@ -module(catlfish_web). -export([start/3, loop/2]). +%% Max size of POST body, in octets. +-define(MAX_RECV_BODY, 10*1024*1024). % 10MB. + start(Options, Module, Name) -> lager:debug("Starting catlfish web server: ~p", [Module]), Loop = fun (Req) -> @@ -62,7 +65,7 @@ loop(Req, Module) -> Req:respond(Result) end; 'POST' -> - Body = Req:recv_body(), + Body = Req:recv_body(?MAX_RECV_BODY), Result = case http_auth:verify_auth(AuthHeader, "POST", Path, Body) of failure -> -- cgit v1.1