Skip to content

Handle oversized event post bodies#2335

Draft
ejsmith wants to merge 2 commits into
mainfrom
codex/event-post-body-limit
Draft

Handle oversized event post bodies#2335
ejsmith wants to merge 2 commits into
mainfrom
codex/event-post-body-limit

Conversation

@ejsmith

@ejsmith ejsmith commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • add a streaming request-body guard for event POSTs so unknown-length bodies can be rejected after the app limit is reached
  • keep Kestrel slightly above the app event-post limit so the controller can return the client-facing status first
  • prevent rejected/truncated event post payloads from being queued and clean up partial saved files

Behavior

  • unknown-length event POSTs over MaximumEventPostSize now return 413 Payload Too Large
  • expected request body read failures are converted to their HTTP status instead of surfacing as unhandled exceptions
  • oversized rejected posts increment the existing too-big usage counter

Verification

  • dotnet test -- --filter-class Exceptionless.Tests.Utility.EventPostRequestBodyStreamTests
  • dotnet test -- --filter-class Exceptionless.Tests.Services.EventPostServiceTests
  • dotnet test -- --filter-class Exceptionless.Tests.Controllers.EventControllerTests
  • dotnet test -- --filter-class Exceptionless.Tests.Controllers.ControllerManifestTests
  • dotnet test -- --filter-class Exceptionless.Tests.Controllers.OpenApiControllerTests

Breaking Changes

  • None

Comment thread src/Exceptionless.Core/Services/EventPostService.cs Fixed
@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.AppHost 39% 40% 134
Exceptionless.Core 71% 63% 8469
Exceptionless.Insulation 24% 23% 203
Exceptionless.Web 75% 63% 4773
Summary 70% (15961 / 22655) 62% (8123 / 13076) 13579

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.

1 participant