Skip to content

[Bug] - RequestHeaderSectionTooLarge should be returned for requests whose total header size exceeds 8 KB. #2180

@niksis02

Description

@niksis02

Describe the bug
S3 has a predefined error type for requests where the total request header size exceeds 8 KB. Currently, the gateway returns a generic 400 Bad Request status instead.

To Reproduce

HEADER_VALUE=$(python3 -c 'print("a" * 9000)') 
curl -v -H "X-Large-Header: $HEADER_VALUE" "http://127.0.0.1:7070/something"

Expected behavior
The following error should be returned:

<Error><Code>RequestHeaderSectionTooLarge</Code><Message>Your request header section exceeds the maximum allowed size.</Message><MaxSizeAllowed>8192</MaxSizeAllowed><RequestId>BDG00KBYDVXTTN9A</RequestId><HostId>iu8j25CopTMvdS+YFAuXFaKwPBvSWLjwtsVBMFwfrkCCuF8j2D4G4vxbRPIp/RNPCBPkyfp5/HIAvsT/OSe5oT1ZZCDA2OJp</HostId></Error>

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions