From 05bbd9e0ee980ebd9acb712020072c2bcbd60257 Mon Sep 17 00:00:00 2001 From: SpyCheese Date: Thu, 29 Sep 2022 18:41:47 +0300 Subject: [PATCH] Remove Content-Length limit --- http/http.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/http/http.cpp b/http/http.cpp index c99a5ec4..63819957 100644 --- a/http/http.cpp +++ b/http/http.cpp @@ -193,9 +193,6 @@ td::Status HttpRequest::add_header(HttpHeader header) { if (found_transfer_encoding_ || found_content_length_) { return td::Status::Error("duplicate Content-Length/Transfer-Encoding"); } - if (len > HttpRequest::max_payload_size()) { - return td::Status::Error("too big Content-Length"); - } content_length_ = len; found_content_length_ = true; } else if (lc_name == "transfer-encoding") { @@ -809,9 +806,6 @@ td::Status HttpResponse::add_header(HttpHeader header) { if (found_transfer_encoding_ || found_content_length_) { return td::Status::Error("duplicate Content-Length/Transfer-Encoding"); } - if (len > HttpRequest::max_payload_size()) { - return td::Status::Error("too big Content-Length"); - } content_length_ = len; found_content_length_ = true; } else if (lc_name == "transfer-encoding") {