[#170] Support tar.gz exploding
All checks were successful
/ DCO (pull_request) Successful in 1m19s
/ Vulncheck (pull_request) Successful in 1m55s
/ Builds (pull_request) Successful in 2m10s
/ Lint (pull_request) Successful in 3m31s
/ Tests (pull_request) Successful in 1m56s

During upload if "X-Attribute-Explode-Archive" is set, gate tries to read tar.gz archive and creates an object for each file. Each object acquires a FilePath attribute which is calculated relative to the archive root

Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
This commit is contained in:
Nikita Zinkevich 2024-12-06 10:48:51 +03:00
parent e81f01c2ab
commit 82271223ae
Signed by: nzinkevich
GPG key ID: 748EA1D0B2E6420A
5 changed files with 106 additions and 45 deletions

View file

@ -39,7 +39,7 @@ func filterHeaders(l *zap.Logger, header *fasthttp.RequestHeader) (map[string]st
// check if key gets duplicated
// return error containing full key name (with prefix)
if _, ok := result[string(clearKey)]; ok {
err = fmt.Errorf("key duplication error: %s", string(key))
err = fmt.Errorf("header key duplication error: %s", string(key))
return
}