<!doctype html><html lang=en><head><title>An Infinite io.Reader in Go · Shallow Brook Software
</title><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=color-scheme content="light dark"><meta name=author content="Andrew Dailey"><meta name=description content="I recently wrote some middleware to ensure that incoming requests to a web server have an explicit size limit.
Until I determine this to be too small, I chose to limit request bodies to 4KB.
Go&rsquo;s ne