Only GET and HEAD shouldn't have a body Signed-off-by: Sergey Ponomarev <stok...@gmail.com> --- uclient-http.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/uclient-http.c b/uclient-http.c index 80d4495..02bb7c2 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -292,14 +292,7 @@ static void uclient_http_process_headers(struct uclient_http *uh) static bool uclient_request_supports_body(enum request_type req_type) { - switch (req_type) { - case REQ_POST: - case REQ_PUT: - case REQ_DELETE: - return true; - default: - return false; - } + return !(req_type == REQ_GET || req_type == REQ_HEAD); } static int -- 2.37.2 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel