From db2e3c0e3ac02a9bc12e68bf7f6a7ed04862d5a8 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Tue, 4 Mar 2014 14:23:26 +0100 Subject: [PATCH] HTTP server: fix requests that are larger than 1024bytes --- pdns/ext/yahttp/yahttp/reqresp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pdns/ext/yahttp/yahttp/reqresp.cpp b/pdns/ext/yahttp/yahttp/reqresp.cpp index 03d59c149b..f9b4d24c6a 100644 --- a/pdns/ext/yahttp/yahttp/reqresp.cpp +++ b/pdns/ext/yahttp/yahttp/reqresp.cpp @@ -222,6 +222,10 @@ namespace YaHTTP { if (chunk_size!=0) return false; // need more data + if (!chunked && bodybuf.str().size() < maxbody) { + return false; // need more data + } + bodybuf.flush(); request->body = bodybuf.str(); bodybuf.str(""); -- 2.47.2