1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Remove Content-Length limit

This commit is contained in:
SpyCheese 2022-09-29 18:41:47 +03:00
parent e39e2d884f
commit 05bbd9e0ee

View file

@ -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") {