Skip to content

Major: max_body size is only checked after processing the entire body of a request #1

@DeusExFiasco

Description

@DeusExFiasco

Issue:
The socket manager processes the entire request in handleClientData even if it exceeds the set max_body byte size. This is a massive waste of time and bandwidth. Simply stopping when the limit is reached and sending an early response will not work however, as it won't cleanly close the client connection.

Potential Solution:
When a request is received, parse the header completely independently from the body of the request and extract the body size metadata. Then, do not even start processing the body if it exceeds the max_body set for that location/server. This of course implies having to already know the relevant location this early into the runtime loop, which will require major restructuring of the request parsing system order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions