From a5a61d645aad3107d4c742cf9537bb4d673c8fbe Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 26 Apr 2024 05:56:23 -0300 Subject: [PATCH] chore(deps): bump ngx_wasm_module to 91d447ffd0e9bb08f11cc69d1aa9128ec36b4526 (#12941) Changes since 3bd94e61c55415ccfb0f304fa51143a7d630d6ae: * 91d447ff - feat(wasmtime) new 'cache_config' directive for compilation cache * 4ed38176 - feat(proxy-wasm) consistent context checks for all header setters * ee5890dd - feat(proxy-wasm) allow setting ':status' response pseudo-header * bb139e16 - hotfix(http) fix an expression in postpone checks * d70c87d4 - refactor(wasm) fix conflicting values in our '*_CONF' definitions * 7ee4eb45 - tests(backtraces) update backtrace formats for latest Rust toolchain * 1d4534d0 - feat(http) implement 'postpone_rewrite' + 'postpone_access' directives * 473a6705 - refactor(wasmx) store ngx_wa_conf_t as our core module context * fa9bc6b9 - chore(deps) bump Nginx to 1.25.5 * faf302c5 - chore(deps) bump OpenSSL to 3.3.0 --- .requirements | 2 +- changelog/unreleased/kong/bump-ngx-wasm-module.yml | 2 +- spec/02-integration/20-wasm/04-proxy-wasm_spec.lua | 2 +- .../fixtures/proxy_wasm_filters/tests/src/routines.rs | 1 - .../proxy_wasm_filters/tests/src/test_http.rs | 11 +++++++---- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.requirements b/.requirements index abe66cf45f72..e198c8975774 100644 --- a/.requirements +++ b/.requirements @@ -16,7 +16,7 @@ ATC_ROUTER=ffd11db657115769bf94f0c4f915f98300bc26b6 # 1.6.2 SNAPPY=23b3286820105438c5dbb9bc22f1bb85c5812c8a # 1.2.0 KONG_MANAGER=nightly -NGX_WASM_MODULE=3bd94e61c55415ccfb0f304fa51143a7d630d6ae +NGX_WASM_MODULE=91d447ffd0e9bb08f11cc69d1aa9128ec36b4526 WASMER=3.1.1 WASMTIME=19.0.0 V8=12.0.267.17 diff --git a/changelog/unreleased/kong/bump-ngx-wasm-module.yml b/changelog/unreleased/kong/bump-ngx-wasm-module.yml index 354b86844da6..cddaf5cf0e1d 100644 --- a/changelog/unreleased/kong/bump-ngx-wasm-module.yml +++ b/changelog/unreleased/kong/bump-ngx-wasm-module.yml @@ -1,2 +1,2 @@ -message: "Bump `ngx_wasm_module` to `3bd94e61c55415ccfb0f304fa51143a7d630d6ae`" +message: "Bump `ngx_wasm_module` to `91d447ffd0e9bb08f11cc69d1aa9128ec36b4526`" type: dependency diff --git a/spec/02-integration/20-wasm/04-proxy-wasm_spec.lua b/spec/02-integration/20-wasm/04-proxy-wasm_spec.lua index d0c264694b64..ce637af87f6b 100644 --- a/spec/02-integration/20-wasm/04-proxy-wasm_spec.lua +++ b/spec/02-integration/20-wasm/04-proxy-wasm_spec.lua @@ -281,7 +281,7 @@ describe("proxy-wasm filters (#wasm) (#" .. strategy .. ")", function() assert.res_status(200, res) assert.response(res).has.no.header("x-via") assert.logfile().has.line([[testing in "Log"]]) - assert.logfile().has.line("cannot add response header: headers already sent") + assert.logfile().has.line("can only set response headers before \"on_response_body\"") end) pending("throw a trap", function() diff --git a/spec/fixtures/proxy_wasm_filters/tests/src/routines.rs b/spec/fixtures/proxy_wasm_filters/tests/src/routines.rs index 73e6af9726dc..dc8fff0403fc 100644 --- a/spec/fixtures/proxy_wasm_filters/tests/src/routines.rs +++ b/spec/fixtures/proxy_wasm_filters/tests/src/routines.rs @@ -18,7 +18,6 @@ pub(crate) fn add_response_header(ctx: &mut TestHttp) { let (name, value) = header.split_once('=').unwrap(); ctx.add_http_response_header(name, value); - ctx.set_http_request_header(HEADER_NAME, None) } const CONFIG_HEADER_NAME: &str = "X-PW-Resp-Header-From-Config"; diff --git a/spec/fixtures/proxy_wasm_filters/tests/src/test_http.rs b/spec/fixtures/proxy_wasm_filters/tests/src/test_http.rs index 83da6555d6a8..38d78be5f2ba 100644 --- a/spec/fixtures/proxy_wasm_filters/tests/src/test_http.rs +++ b/spec/fixtures/proxy_wasm_filters/tests/src/test_http.rs @@ -98,11 +98,14 @@ impl TestHttp { if cur_phase == on_phase { info!("[proxy-wasm] testing in \"{:?}\"", on_phase); - self.set_http_request_header(INPUT_HEADER_NAME, None); - self.set_http_request_header(TEST_HEADER_NAME, None); - self.set_http_request_header(PHASE_HEADER_NAME, None); + if cur_phase == TestPhase::RequestHeaders || cur_phase == TestPhase::RequestBody { + self.set_http_request_header(INPUT_HEADER_NAME, None); + self.set_http_request_header(TEST_HEADER_NAME, None); + self.set_http_request_header(PHASE_HEADER_NAME, None); + + add_request_header(self); + } - add_request_header(self); add_response_header(self); if let Some(test) = opt_test {