Skip to content

Connection limiting doesn't do what it says. #242

@Davidde94

Description

@Davidde94

If I create a HTTPServer with a connection limit of 2, then I would expect only 2 connections to be made. However, the current implementation allows essentially an unlimited number of connections, subject only to OS limits.

This appears to be because the connection limit logic occurs inside HTTPRequestHandler, an InboundChannelHandler. By definition, the connection must exist for the execution to reach this point. Correct me if I'm wrong, but what I think you're trying to achieve is to limit the number of concurrent requests, not literal connections?

The limiting logic also appears to be evaluated at the end of a HTTP request. This is a fairly major issue, as it allows me to dump massive requests before you try and stop me. At the very least it would be a good idea to move the logic to the very start of "channelRead" to shut the connection down before data is sent.

Hope that helps, me and the rest of the NIO are more than happy to help at any time :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions