Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3079bda

Browse files
committed
Use size_t to store content length.
1 parenta941fb1 commit3079bda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎include/network/protocol/http/client/connection/async_normal.ipp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
738738
auto it = headers.find("Content-Length");
739739
if (it != headers.end()) {
740740
try {
741-
content_length_ =std::stoi(it->second);
741+
content_length_ =std::stoul(it->second);
742742
NETWORK_MESSAGE("Content-Length:" << *content_length_);
743743
}catch(const std::invalid_argument&) {
744744
}catch(const std::out_of_range&) {
@@ -825,7 +825,7 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
825825
boost::promise<boost::uint16_t> status_promise;
826826
boost::promise<std::string> status_message_promise;
827827
boost::promise<std::multimap<std::string, std::string> > headers_promise;
828-
boost::optional<unsigned> content_length_;
828+
boost::optional<size_t> content_length_;
829829
boost::promise<std::string> source_promise;
830830
boost::promise<std::string> destination_promise;
831831
boost::promise<std::string> body_promise;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp