bugfix/607-support_trailer_headers #620
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#620
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "dkirillov/frostfs-s3-gw:bugfix/607-support_trailer_headers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
close #607
WIP: bugfix/607-support_trailer_headersto bugfix/607-support_trailer_headers@ -172,0 +203,4 @@
}
switch {
case slices.Contains(c.trailerHeaders, string(k[:len(k)-1])):
Can we assume that
k
always has at least the length of one, so this code will never panic?Yes. The following code should prevent as from panic
k, err = c.reader.ReadBytes(':')
if err != nil {
if err == io.EOF {
break
}
c.err = errMalformedTrailerHeaders
return c.err
}
we got error if we couldn't meet
:
that lead to breaking the loop@ -172,0 +206,4 @@
case slices.Contains(c.trailerHeaders, string(k[:len(k)-1])):
c.buffer = append(append(c.buffer, k...), v...) // todo use copy
case string(k) == "x-amz-trailer-signature:":
n, err := hex.Decode(v[:], bytes.TrimRight(v[:], "*\n"))
Didn't know
bytes.TrimRight
supports wildcard*
👍It doesn't. It's literally
*
characterHm, wait, is it some kind of a wildcard or just a
*
?Just
*