Skip to content

Conversation

@blva
Copy link
Collaborator

@blva blva commented Dec 23, 2025

Proposed changes

Adds a new configuration option to control the maximum size of HTTP request bodies when using the HTTP transport. This addresses PayloadTooLargeError issues when clients send large JSON payloads.

  • Default value: 100kb (Express.js default)
  • Supports formats like '100kb', '1mb', '50mb'
  • Only applies when transport is 'http'

Checklist

@blva blva requested a review from a team as a code owner December 23, 2025 18:34
Copilot AI review requested due to automatic review settings December 23, 2025 18:34
@blva blva changed the title feat: Add httpBodyLimit config option for streamable HTTP feat: add httpBodyLimit config option for streamable HTTP Dec 23, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a configurable httpBodyLimit option to control the maximum size of HTTP request bodies when using HTTP transport, addressing PayloadTooLargeError issues with large JSON payloads.

  • Adds httpBodyLimit configuration option with a default of "100kb"
  • Updates Express.js middleware to use the configured limit
  • Documents the new option in README with environment variable and CLI flag

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/transports/streamableHttp.ts Updates Express.js JSON middleware to use the configured body limit
src/common/config/userConfig.ts Adds the httpBodyLimit configuration schema with default value and description
README.md Documents the new configuration option in the configuration table

@blva blva changed the title feat: add httpBodyLimit config option for streamable HTTP feat: add body limit config option for streamable HTTP Dec 23, 2025
@blva blva force-pushed the add-http-body-limit-config branch from e6a6354 to ac17be5 Compare December 23, 2025 18:47
Adds a new configuration option to control the maximum size of HTTP request
bodies when using the HTTP transport. This addresses PayloadTooLargeError
issues when clients send large JSON payloads.

- Default value: 100kb (Express.js default)
- Supports formats like '100kb', '1mb', '50mb'
- Only applies when transport is 'http'

Includes:
- Unit tests for config parsing (CLI and env vars)
- Integration tests for body limit enforcement
- Updated configOverrides test for not-allowed fields
@blva blva force-pushed the add-http-body-limit-config branch from ac17be5 to f5d6cbc Compare December 23, 2025 18:49
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 20468981427

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 79.426%

Totals Coverage Status
Change from base Build 20442137404: 0.01%
Covered Lines: 6796
Relevant Lines: 8482

💛 - Coveralls

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 20468948459

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 79.418%

Totals Coverage Status
Change from base Build 20442137404: 0.004%
Covered Lines: 6796
Relevant Lines: 8482

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants