Skip to content

Commit 4054936

Browse files
committed
Print a debug message if content length conversion to size_t fails.
1 parent 3079bda commit 4054936

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,11 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
741741
content_length_ = std::stoul(it->second);
742742
NETWORK_MESSAGE("Content-Length: " << *content_length_);
743743
} catch(const std::invalid_argument&) {
744+
NETWORK_MESSAGE("invalid argument exception while interpreting "
745+
<< it->second << " as content length");
744746
} catch(const std::out_of_range&) {
747+
NETWORK_MESSAGE("out of range exception while interpreting "
748+
<< it->second << " as content length");
745749
}
746750
}
747751
headers_promise.set_value(headers);

0 commit comments

Comments
 (0)