Skip to content

Socket errors ERR_CONNECTION_RESET after receiving HTTP request that exceeds LimitRequestBody #430

@amiart

Description

@amiart

I set LimitRequestBody to 50MB in application.ini:

LimitRequestBody=52428800

If I upload a file larger than 100MB, it will be rejected and the socket connection will be disconnected, which is correct, but from that point on, subsequent HTTP requests stop working.

I've noticed that this is because the buffer TActionThread::_readBuffer isn't cleared when the thread finish, and subsequent HTTP requests that are handled on the same thread are also rejected for the same reason.

Furthermore, I don't understand why the LimitRequestBody value read from the application.ini file is multiplied by two in the TEpollHttpSocket and THttpSocket classes. The same LimitRequestBody value in the TActionContext isn't multiplied. I guess this is a bug too.

Here is my fix:


Image --- Image --- Image ---

Config:
Windows 10
Qt 5.15.18 x86
TreeFrog 2.4.0

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