From a8f657c2d6a5354df19df778780cbc2f75601174 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 21 Jan 2022 09:43:55 +0000 Subject: [PATCH] schemas/README: bottle body size limit *is* affected by compression I explicitly tested this with a 50KiB limit on beta EDDN service: 1. 49973 byte message does make it through, in plain text. 2. 51312 byte message, no compression, 413. 3. Same message, with gzip compression, 200 4. The 149242 byte file I based those extra ones on also makes it through when compressed. Indeed the Gateway logging cites the compressed-body size. `bottle` isn't looking at the message and magically decompressing it in order to check plain-text size. --- schemas/README-EDDN-schemas.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/schemas/README-EDDN-schemas.md b/schemas/README-EDDN-schemas.md index 50c1dfd..3de98f6 100644 --- a/schemas/README-EDDN-schemas.md +++ b/schemas/README-EDDN-schemas.md @@ -332,8 +332,10 @@ make a valid request" responses you might experience the following: #### bottle responses 1. `413` - `Payload Too Large` - `bottle` enforces a maximum request size - and the request exceeds that. As of 2022-01-07 the limit is 1MiB, and - pertains to the plain-text size, not after gzip compression if used. + and the request exceeds that. As of 2022-01-07 the limit is 1MiB, + which is versus the compressed size of the body, if compression is + used. Thus compression *will* allow for sending approximately 10x + larger messages. To verify the current limit check for the line that looks like: ```