From 918f4ceab8c4c5a6bc3f11561b077db9514b9430 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Thu, 15 Dec 2016 11:52:15 -0500 Subject: [PATCH] bug in long post request handling w/ embedded httpd --- cgi.d | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cgi.d b/cgi.d index cb70c5f..123a2b3 100644 --- a/cgi.d +++ b/cgi.d @@ -1243,6 +1243,7 @@ class Cgi { throw new Exception("wtf is up with such a gigantic form submission????"); pps.buffer ~= chunk; + // simple handling, but it works... until someone bombs us with gigabytes of crap at least... if(pps.buffer.length == pps.expectedLength) pps._post = decodeVariables(cast(string) pps.buffer); @@ -3639,6 +3640,8 @@ ByChunkRange byChunk(BufferedInputRange ir, size_t atMost) { } override void popFront() { + ir.consume(f.length); + atMost -= f.length; auto a = ir.front(); if(a.length <= atMost) {