Fork me on GitHub

Has anyone ever tried to protect a ring-powered Jetty server against very large requests (POST, PUT, the unusual GET with a body)? I know about org.eclipse.jetty.server.Request.maxFormContentSize but that does only protect against requests which contain a valid content-length if I read correctly (stepping into the getContentLength(), too)


Ideally, I would like to accept only requests with a content length that is small enough and then read only that many bytes from the body. I think, I could do it in a middleware, but I have not yet done enough research on that.