Skip to content

Commit d4f39a8

Browse files
committed
BUG: AHPS may sends incorrect data of message-body to the origin server, if the request method is POST or PUT
1 parent a920f9c commit d4f39a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/http_proxy_server_connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ void http_proxy_server_connection::on_proxy_client_data_arrived(std::size_t byte
684684
}
685685
}
686686
this->connection_context.connection_state = proxy_connection_state::write_http_request_content;
687-
this->async_write_data_to_origin_server(this->upgoing_buffer_write.data(), 0, this->upgoing_buffer_write.size());
687+
this->async_write_data_to_origin_server(this->upgoing_buffer_write.data(), 0, bytes_transferred);
688688
}
689689
else if (this->connection_context.connection_state == proxy_connection_state::tunnel_transfer) {
690690
this->async_write_data_to_origin_server(this->upgoing_buffer_write.data(), 0, bytes_transferred);

0 commit comments

Comments
 (0)