From fc3d3fbf7504f55aeaf3de7673cec9a0842b0b22 Mon Sep 17 00:00:00 2001 From: Jun Ouyang Date: Wed, 4 Sep 2024 15:24:24 +0800 Subject: [PATCH] fix(pdk): remove http2 error in kong.request.enable_buffering() function --- kong/pdk/service/request.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kong/pdk/service/request.lua b/kong/pdk/service/request.lua index 28fab489e6a4..df006db72935 100644 --- a/kong/pdk/service/request.lua +++ b/kong/pdk/service/request.lua @@ -89,13 +89,6 @@ local function new(self) -- kong.service.request.enable_buffering() request.enable_buffering = function() check_phase(access_rewrite_balancer) - - if ngx.req.http_version() >= 2 then - error("buffered proxying cannot currently be enabled with http/" .. - ngx.req.http_version() .. ", please use http/1.x instead", 2) - end - - ngx.ctx.buffered_proxying = true end