Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/gcs-sidecar/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ func readMessage(r io.Reader) (messageHeader, []byte, error) {
}

n := header.Size
if n < prot.HdrSize || n > prot.MaxMsgSize {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inbox GCS transport has a buffer limit of 64kb, so maybe we can drop this check for messages handled strictly by gcs-sidecar (policy/fragments etc) and we can ensure the size on the rest of the messages?

// Deliberately don't enforce MaxMsgSize here. This follows what the LCOW
// gcs does, and allows us to inject long fragments.
if n < prot.HdrSize {
logrus.Errorf("invalid message size %d", n)
return messageHeader{}, nil, fmt.Errorf("invalid message size %d: %w", n, err)
}
Expand Down
Loading