'Increase max allowed header size when hitting an S3 bucket endpoint

I am curl-ing an endpoint that does a redirection to an S3-bucket.

I must pass some large headers to my request which fails because the max header size is exceeded:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
   <Code>RequestHeaderSectionTooLarge</Code>
   <Message>Your request header section exceeds the maximum allowed size.</Message>
   <MaxSizeAllowed>8192</MaxSizeAllowed>
   <RequestId>AP394DD4D4F133</RequestId>
   <HostId>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</HostId>
</Error>

Is there a way to tweak this at the S3 level & increase the maximum allowed header size?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source