I'm trying to use the downstream reedelk-transformer to transform my backend service's boby response, but my backend returns the response "Chunked" and I'm getting the error below.
I got the same error with both kong versions 2.1.4 and 2.4.0.
Is it possible to use the downstream reedelk-transformer with Chunked Transfer Encoding response?
Content encoding: gzip
Transfer-Encoding: chunked
_format_version: "2.1"
services:
- name: callcontrol
url: https://service_host:port/resource
plugins:
- name: reedelk-transformer
config:
downstream_transformer_url: http://192.168.197.128:8282/api/message
routes:
- name: callcontrol
paths:
- /callcontrol/v1
2021/05/11 02:06:08 [error] 32#0: *21 failed to run body_filter_by_lua*: /usr/local/share/lua/5.1/socket/http.lua:131: attempt to concatenate local 'v' (a table value)
kong_nodb | stack traceback:
kong_nodb | [C]: in function 'request'
kong_nodb | .../kong/plugins/reedelk-transformer/downstream_handler.lua:49: in function 'handle_body'
kong_nodb | ...are/lua/5.1/kong/plugins/reedelk-transformer/handler.lua:25: in function <...are/lua/5.1/kong/plugins/reedelk-transformer/handler.lua:23>
kong_nodb | /usr/local/share/lua/5.1/kong/init.lua:265: in function 'execute_plugins_iterator'
kong_nodb | /usr/local/share/lua/5.1/kong/init.lua:1191: in function 'body_filter'
kong_nodb | body_filter_by_lua:2: in main chunk while sending to client, client: 192.168.197.128, server: kong, request: "GET /callcontrol/v1 HTTP/1.1", upstream: "https://service_host:port/resource", host: "192.168.197.128:8000"
kong_nodb | 192.168.197.128 - - [11/May/2021:02:06:08 +0000] "GET /callcontrol/v1 HTTP/1.1" 400 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36"