Skip to content

Commit 0960fb9

Browse files
committed
FIX | proxy bug #2
1 parent 934cda3 commit 0960fb9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/services/ManapiFetch.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,15 @@ static manapi::future<manapi::error::status> curl_recv_async_continiue (std::sha
432432

433433
static manapi::future<bool> handle_body_verify (std::shared_ptr<manapi::net::fetch::data_t> data) {
434434
bool flg = false;
435+
436+
auto res = curl_easy_getinfo(data->curl.get(), CURLINFO_HTTP_CODE, &data->status_code_);
437+
if (res) {
438+
manapi_log_trace(manapi::debug::LOG_TRACE_MEDIUM, "%s:%s failed due to %s", "fetch",
439+
"curl_easy_getinfo with CURLINFO_HTTP_CODE", curl_easy_strerror(res));
440+
}
441+
435442
try {
436443
if (data->async_handler_headers) {
437-
if (!data->status_code_)
438-
curl_easy_getinfo(data->curl.get(), CURLINFO_HTTP_CODE, &data->status_code_);
439-
440444
auto const cb = std::move(data->async_handler_headers);
441445
flg = co_await cb->operator()(std::move(*data->headers));
442446
}

0 commit comments

Comments
 (0)