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

Bugfixes in rldp-http-proxy and http parser

This commit is contained in:
SpyCheese 2022-10-04 11:07:38 +03:00
parent 4b940f8bad
commit 69cee95abb
4 changed files with 7 additions and 5 deletions

View file

@ -79,10 +79,10 @@ td::Status HttpInboundConnection::receive(td::ChainBufferReader &input) {
send_client_error();
return td::Status::OK();
}
cur_request_ = R.move_as_ok();
if (exit_loop) {
return td::Status::OK();
}
cur_request_ = R.move_as_ok();
}
auto payload = cur_request_->create_empty_payload().move_as_ok();

View file

@ -42,10 +42,10 @@ td::Status HttpOutboundConnection::receive(td::ChainBufferReader &input) {
answer_error(HttpStatusCode::status_bad_request, "", std::move(promise_));
return td::Status::OK();
}
cur_response_ = R.move_as_ok();
if (exit_loop) {
return td::Status::OK();
}
cur_response_ = R.move_as_ok();
}
if (cur_response_->code() == 100) {

View file

@ -587,7 +587,7 @@ tl_object_ptr<ton_api::http_payloadPart> HttpPayload::store_tl(size_t max_size)
max_size -= s.size();
}
obj->data_.truncate(obj->data_.size() - S.size());
if (chunks_.size() != 0) {
if (chunks_.size() != 0 || !parse_completed()) {
return obj;
}
if (!written_zero_chunk_) {