Skip to content

Conversation

wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Oct 17, 2025

No description provided.

BrennanConroy and others added 2 commits September 9, 2025 17:11
#### AI description  (iteration 1)
#### PR Classification
Bug fix to ensure correct parsing of HTTP chunked requests.

#### PR Summary
This pull request refines chunked request parsing by enforcing stricter checks on chunk extensions in accordance with RFC 9112, and it adds thorough tests for both valid and invalid input scenarios. The changes improve error handling and request rejection when encountering malformed chunk extensions.
- **`src/Servers/Kestrel/test/FunctionalTests/ChunkedRequestTests.cs`**: Added tests to validate behavior for requests with invalid newlines and various chunk extension formats.
- **`src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs`**: Updated parsing logic to correctly detect CRLF sequences and reject improperly formatted chunk extensions, including support for an insecure parsing switch.
- **`src/Servers/Kestrel/Core/test/MessageBodyTests.cs`**: Modified test inputs to align with the updated chunk extension parsing.
- **`src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs`**: Introduced a new rejection reason, `BadChunkExtension`, for invalid chunk extensions.
- **`eng/PatchConfig.props`**: Updated patch configuration for version 2.3.4 to include the Kestrel core package changes.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 18:10
Copy link
Contributor

@Copilot 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

Updates branding to version 2.3.7 and incorporates internal commits introducing stricter chunked request parsing, a new rejection reason, and associated tests.

  • Adds parsing logic for chunk extensions with secure vs legacy (insecure) modes and introduces BadChunkExtension rejection.
  • Updates baseline and patch configuration versions for Kestrel.Core.
  • Adds functional and unit tests covering valid/invalid chunk extensions and newline edge cases.

Reviewed Changes

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

Show a summary per file
File Description
version.props Bumps patch version to 2.3.7.
src/Servers/Kestrel/test/FunctionalTests/ChunkedRequestTests.cs Adds tests for valid and invalid chunk extensions and newline edge cases.
src/Servers/Kestrel/Core/test/MessageBodyTests.cs Adjusts test inputs to align with new chunk extension parsing behavior.
src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs Adds BadChunkExtension enum value and trailing comma.
src/Servers/Kestrel/Core/src/Internal/Http/PipelineExtensions.cs Introduces PositionOfAny helper for ReadOnlySequence search.
src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs Implements chunk extension parsing with secure/insecure modes and rejection logic.
src/Servers/Kestrel/Core/src/CoreStrings.resx Adds error string for bad chunk extension.
src/Servers/Kestrel/Core/src/BadHttpRequestException.cs Maps new rejection reason to 400 Bad Request exception.
eng/PatchConfig.props Adds 2.3.6 packages-to-patch configuration and initializes 2.3.7 group.
eng/Baseline.xml Updates baseline version and Kestrel.Core package baseline.
eng/Baseline.Designer.props Updates baseline package version for Kestrel.Core.
Files not reviewed (1)
  • src/Servers/Kestrel/Core/src/Properties/CoreStrings.Designer.cs: Language not supported

Copy link
Contributor

Hi @@wtgodbe. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@wtgodbe wtgodbe merged commit 52b5734 into release/2.3 Oct 17, 2025
2 of 4 checks passed
@wtgodbe wtgodbe deleted the wtgodbe/9merge branch October 17, 2025 18:53
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.

2 participants