]> granicus.if.org Git - pdns/commitdiff
HTTP server: fix requests that are larger than 1024bytes
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Tue, 4 Mar 2014 13:23:26 +0000 (14:23 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Tue, 4 Mar 2014 13:23:26 +0000 (14:23 +0100)
pdns/ext/yahttp/yahttp/reqresp.cpp

index 03d59c149bad4d8d598e86ffe76d2d3ee1202fdd..f9b4d24c6a2f5a4b0410efd8ffd1b49e16a72125 100644 (file)
@@ -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("");