No, such a buffer could put a lot of memory pressure an inefficiency in the
pipline and may break app that don't work well with buffering.
On 19 Mar 2014 11:33, "Stefan Ossendorf" <notifications@github.com> wrote:

> In src/Owin.Limits/MaxRequestContentLengthMiddleware.cs:
>
> > +            if (requestMethod != "GET" && requestMethod != "HEAD") {
> > +                var contentLengthHeaderValue = request.Headers.Get("Content-Length");
> > +                if (contentLengthHeaderValue == null) {
> > +                    context.Response.StatusCode = 411;
> > +                    context.Response.ReasonPhrase = "The Content-Length header is missing.";
> > +                    return;
> > +                }
> > +                int contentLength;
> > +                if (!int.TryParse(contentLengthHeaderValue, out contentLength)) {
> > +                    context.Response.StatusCode = 400;
> > +                    context.Response.ReasonPhrase = "The Content-Length header value is not a valid number.";
> > +                    return;
> > +                }
> > +                var maxContentLength = _getMaxContentLength();
> > +
> > +                if (contentLength > maxContentLength) {
>
> Or read Request.Body to the end and wire up a new Stream and replace the
> old Body-Stream?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/owin-middleware/Owin.Limits/pull/5/files#r10743681>
> .
>