From be7962f14077b365abde4218704396b39419720b Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 24 May 2020 15:18:34 -0400 Subject: [PATCH] Fix #489 --- httplib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 02e8719..01d3d21 100644 --- a/httplib.h +++ b/httplib.h @@ -3043,7 +3043,8 @@ get_range_offset_and_length(const Request &req, const Response &res, inline bool expect_content(const Request &req) { if (req.method == "POST" || req.method == "PUT" || req.method == "PATCH" || - req.method == "PRI" || req.method == "DELETE") { + req.method == "PRI" || + (req.method == "DELETE" && req.has_header("Content-Length"))) { return true; } // TODO: check if Content-Length is set