Skip to content

RequestHeaderParser causing server unusable when POST body exceeds 4096 #87

@halftan

Description

@halftan

The header size limits here, evaluates the entire HTTP request's size strlen($data) where $data contains everything read from Stream, whose data event emitted here.

My solution is to change:

        if (strlen($this->buffer) + strlen($data) > $this->maxSize) {

into:

        @list($header,) = explode("\r\n\r\n", $data);
        if (strlen($this->buffer) + strlen($header) > $this->maxSize) {

If it's ok, then I'll submit a PR regarding this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions