Skip to content

Commit

Permalink
Remove Content-Length limit
Browse files Browse the repository at this point in the history
  • Loading branch information
SpyCheese committed Sep 29, 2022
1 parent e39e2d8 commit 05bbd9e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions http/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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") {
Expand Down

0 comments on commit 05bbd9e

Please sign in to comment.