From af5f8e4d6c43dd4fb5087dc3327d8bc976feaf91 Mon Sep 17 00:00:00 2001 From: Jun Ouyang Date: Mon, 17 Jun 2024 11:31:40 +0800 Subject: [PATCH] fix(core): fix code --- spec/02-integration/05-proxy/22-reports_spec.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/02-integration/05-proxy/22-reports_spec.lua b/spec/02-integration/05-proxy/22-reports_spec.lua index eab85e46803f..7b43172860ea 100644 --- a/spec/02-integration/05-proxy/22-reports_spec.lua +++ b/spec/02-integration/05-proxy/22-reports_spec.lua @@ -242,6 +242,20 @@ for _, strategy in helpers.each_strategy() do proxy_ssl_client:close() end) + it("when send http request to https port, no other error in error.log", function() + local https_port = assert(helpers.get_proxy_port(true)) + local proxy_client = assert(helpers.proxy_client(nil, https_port)) + local res = proxy_client:get("/", { + headers = { host = "http-service.test" } + }) + reports_send_ping({port=constants.REPORTS.STATS_TLS_PORT}) + + assert.response(res).has_status(400) + assert.logfile().has.no.line("using uninitialized") + assert.logfile().has.no.line("could not determine log suffix (scheme=http, proxy_mode=)") + proxy_client:close() + end) + it("reports h2c requests", function() local h2c_client = assert(helpers.proxy_client_h2c()) local body, headers = h2c_client({