Ha! I think i found a nice solution!
Assumption: ContentLengthLimitingStream() throws a ContentLengthExceededException
See:
```
public async Task Invoke(IDictionary<string, object> environment){
// Bla bla bla
context.Request.Body = new ContentLengthLimitingStream(context.Request.Body, maxContentLength);
await _next(environment).ContinueWith(task => {
                task.Exception.Flatten().Handle(exc => {
                     // Only handle our exception, all others should bubble up
                     if (exc is ContentLengthExceededException) {
                        context.Response.StatusCode = 411;
                        // Do your Response stuff and get the correct code :-)
                        return true;
                    }
                    return false;
                });
            }, TaskContinuationOptions.OnlyOnFaulted);
}
```