Skip to content

Request Response has hard coded limits for message sizes #5791

Closed
@tqwewe

Description

@tqwewe

Description

The request/response module has a 1 MB limit on requests, and 10 MB limit on responses, both hard coded as fixed limits.

/// Max request size in bytes
const REQUEST_SIZE_MAXIMUM: u64 = 1024 * 1024;
/// Max response size in bytes
const RESPONSE_SIZE_MAXIMUM: u64 = 10 * 1024 * 1024;

It would be preferable if this was configurable.

Is there a reason why these limits are set to these values, are there any obvious downsides to having much higher limits, or no limits at all?

Motivation

Messages which exceed these limits fail with a confusing Eof { name: "u8", expect: Small(1) } error. Sending messages larger than these, such as files, etc would be useful.

Current Implementation

Limits messages to 1 MB for requests, and 10 MB for responses for both JSON and CBOR implementations.

Are you planning to do it yourself in a pull request?

Maybe

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