mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 23:00:59 -05:00
* fix(http): remove 8 KB per-attribute limit on form-encoded request bodies Vert.x 4.x defaults HttpServerOptions.maxFormAttributeSize to a small value (effectively 8 KB via the Netty AbstractHttpData limit). This causes any request with Content-Type: application/x-www-form-urlencoded that carries a single attribute larger than the limit to be rejected with "Size exceed allowed maximum capacity". Two places fixed: - HttpOptionsCustomizer (new CDI bean): sets maxFormAttributeSize=-1 on the main Quarkus HTTP server so large form-encoded AWS Query Protocol requests (CloudFormation templates, EC2 UserData in base64, large IAM policies, etc.) are accepted. The overall body size is still bounded by quarkus.http.limits.max-body-size (512 MB). - RuntimeApiServer: passes HttpServerOptions with maxFormAttributeSize=-1 when creating the per-container Vert.x HTTP server. This fixes the case where the Lambda runtime posts a large synchronous response body (e.g. a 5 MB base64 payload) back to the Runtime API endpoint and the body is incorrectly decoded through the form attribute path. * fix(lambda): enforce AWS invoke payload size limits (sync 6 MB, async 1 MB) Rejects oversized invocation requests with HTTP 413 RequestTooLargeException before dispatching to the container, matching the AWS Lambda API contract. Also enforces the 6 MB sync response limit after the function returns. * test(lambda): add tests for invoke payload size limits Unit/integration tests (LambdaIntegrationTest) cover sync >6 MB and async >1 MB request rejections plus boundary-at-limit acceptance. Compat test (LambdaPayloadSizeLimitTest) uses the Java SDK to verify RequestTooLargeException is surfaced correctly, including a Docker-gated test for the 6 MB response limit. * test(lambda): add regression test for 5 MB response via RuntimeApiServer Verifies that a sync invocation returning a 5 MB body (within the 6 MB AWS limit) succeeds end-to-end. Without the maxFormAttributeSize fix on the RuntimeApiServer, the Lambda runtime's POST of the large response body was rejected by Netty's 8 KB form-attribute cap, crashing the request with "Size exceed allowed maximum capacity".