Here's a test endpoint evaluating this behaviour. While requesting /test/2776 works and returns a string of 2776 "x", /test/2777 will result in a ERR_CONTENT_LENGTH_MISMATCH.
@ampule.route("/test/<length>")
def light_set(request, length):
output = "X" + "x"*(int(length)-2) + "X"
return (200, {}, output)
When serving responses longer than 2572 chars, a
ERR_CONTENT_LENGTH_MISMATCH
is caught by the browser:By sending an empty header instead this increases from 2572 to 2776 chars:
Here's a test endpoint evaluating this behaviour. While requesting
/test/2776
works and returns a string of 2776 "x",/test/2777
will result in aERR_CONTENT_LENGTH_MISMATCH
.