mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 08:27:06 +00:00
feat(s3): enforce multipart presigned size limits (#6732)
This commit is contained in:
@@ -81,6 +81,7 @@ pub enum StorageErrorCode {
|
||||
InsufficientWriteQuorum,
|
||||
PreconditionFailed,
|
||||
EntityTooSmall,
|
||||
EntityTooLarge,
|
||||
InvalidRangeSpec,
|
||||
NotModified,
|
||||
InvalidPartNumber,
|
||||
@@ -169,6 +170,7 @@ impl StorageErrorCode {
|
||||
Self::InsufficientWriteQuorum => 0x3A,
|
||||
Self::PreconditionFailed => 0x3B,
|
||||
Self::EntityTooSmall => 0x3C,
|
||||
Self::EntityTooLarge => 0x56,
|
||||
Self::InvalidRangeSpec => 0x3D,
|
||||
Self::NotModified => 0x3E,
|
||||
Self::InvalidPartNumber => 0x3F,
|
||||
@@ -257,6 +259,7 @@ impl StorageErrorCode {
|
||||
0x3A => Some(Self::InsufficientWriteQuorum),
|
||||
0x3B => Some(Self::PreconditionFailed),
|
||||
0x3C => Some(Self::EntityTooSmall),
|
||||
0x56 => Some(Self::EntityTooLarge),
|
||||
0x3D => Some(Self::InvalidRangeSpec),
|
||||
0x3E => Some(Self::NotModified),
|
||||
0x3F => Some(Self::InvalidPartNumber),
|
||||
@@ -350,6 +353,7 @@ mod tests {
|
||||
(StorageErrorCode::InsufficientWriteQuorum, 0x3A),
|
||||
(StorageErrorCode::PreconditionFailed, 0x3B),
|
||||
(StorageErrorCode::EntityTooSmall, 0x3C),
|
||||
(StorageErrorCode::EntityTooLarge, 0x56),
|
||||
(StorageErrorCode::InvalidRangeSpec, 0x3D),
|
||||
(StorageErrorCode::NotModified, 0x3E),
|
||||
(StorageErrorCode::InvalidPartNumber, 0x3F),
|
||||
|
||||
Reference in New Issue
Block a user