From d712b085e6303cf26fff2d179511008c0076efda Mon Sep 17 00:00:00 2001 From: linrunqi08 Date: Fri, 27 Dec 2024 09:50:14 +0000 Subject: [PATCH 1/2] fix AsynHttpRequest constructor --- core/common/http/HttpRequest.h | 2 +- core/runner/sink/http/HttpSinkRequest.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/common/http/HttpRequest.h b/core/common/http/HttpRequest.h index 13ef2db70c..71f06859b1 100644 --- a/core/common/http/HttpRequest.h +++ b/core/common/http/HttpRequest.h @@ -97,9 +97,9 @@ struct AsynHttpRequest : public HttpRequest { const std::string& query, const std::map& header, const std::string& body, - HttpResponse&& response = HttpResponse(), uint32_t timeout = static_cast(INT32_FLAG(default_http_request_timeout_secs)), uint32_t maxTryCnt = static_cast(INT32_FLAG(default_http_request_max_try_cnt)), + HttpResponse&& response = HttpResponse(), bool followRedirects = false, std::optional tls = std::nullopt) : HttpRequest( diff --git a/core/runner/sink/http/HttpSinkRequest.h b/core/runner/sink/http/HttpSinkRequest.h index f8220f7722..14badba14f 100644 --- a/core/runner/sink/http/HttpSinkRequest.h +++ b/core/runner/sink/http/HttpSinkRequest.h @@ -36,7 +36,7 @@ struct HttpSinkRequest : public AsynHttpRequest { uint32_t timeout = static_cast(INT32_FLAG(default_http_request_timeout_secs)), uint32_t maxTryCnt = static_cast(INT32_FLAG(default_http_request_max_try_cnt)) ) - : AsynHttpRequest(method, httpsFlag, host, port, url, query, header, body, HttpResponse(), timeout, maxTryCnt), mItem(item) {} + : AsynHttpRequest(method, httpsFlag, host, port, url, query, header, body, timeout, maxTryCnt), mItem(item) {} bool IsContextValid() const override { return true; } void OnSendDone(HttpResponse& response) override {} From e67e33222dd0833a5aa93d4d8811e0c59ec8d4df Mon Sep 17 00:00:00 2001 From: linrunqi08 Date: Fri, 27 Dec 2024 18:15:54 +0800 Subject: [PATCH 2/2] fix build --- core/prometheus/async/PromHttpRequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/prometheus/async/PromHttpRequest.cpp b/core/prometheus/async/PromHttpRequest.cpp index 1f7b6a4eaa..9485f95262 100644 --- a/core/prometheus/async/PromHttpRequest.cpp +++ b/core/prometheus/async/PromHttpRequest.cpp @@ -32,9 +32,9 @@ PromHttpRequest::PromHttpRequest(const std::string& method, query, header, body, - std::move(response), timeout, maxTryCnt, + std::move(response), followRedirects, std::move(tls)), mFuture(std::move(future)),