aboutsummaryrefslogtreecommitdiffstats
path: root/server/resty/session/compressors/zlib.lua
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-03-01 13:03:12 +0100
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-03-01 13:03:12 +0100
commit97d7de9af2cb6cc3bbbcae18ada738ace7771903 (patch)
treea7c6221348272e82406bba446b6b00b1d1b8e608 /server/resty/session/compressors/zlib.lua
parentbf25efd6d3ed28266ed916c0ebe9dd3a45a4affb (diff)
portal-ng pods run under root user
- switch base image from openresty to nginx-unprivileged - remove custom lua plugin code - dynamically determine dns resolver ip during container startup Issue-ID: PORTALNG-67 Change-Id: I23fb5e684dbb98a326afb00911a1f5ae78e2536d Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'server/resty/session/compressors/zlib.lua')
-rw-r--r--server/resty/session/compressors/zlib.lua43
1 files changed, 0 insertions, 43 deletions
diff --git a/server/resty/session/compressors/zlib.lua b/server/resty/session/compressors/zlib.lua
deleted file mode 100644
index 1d23be0..0000000
--- a/server/resty/session/compressors/zlib.lua
+++ /dev/null
@@ -1,43 +0,0 @@
-local zlib = require "ffi-zlib"
-local sio = require "pl.stringio"
-
-local concat = table.concat
-
-local function gzip(func, input)
- local stream = sio.open(input)
- local output = {}
- local n = 0
-
- local ok, err = func(function(size)
- return stream:read(size)
- end, function(data)
- n = n + 1
- output[n] = data
- end, 8192)
-
- if not ok then
- return nil, err
- end
-
- if n == 0 then
- return ""
- end
-
- return concat(output, nil, 1, n)
-end
-
-local compressor = {}
-
-function compressor.new()
- return compressor
-end
-
-function compressor.compress(_, data)
- return gzip(zlib.deflateGzip, data)
-end
-
-function compressor.decompress(_, data)
- return gzip(zlib.inflateGzip, data)
-end
-
-return compressor