Skip to content

Use CRLF for chunked response framing test - #132124

Open
rzikm with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-getasync-chunked-test-failure
Open

Use CRLF for chunked response framing test#132124
rzikm with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-getasync-chunked-test-failure

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

main PR N/A

Description

The chunked-response test generated bare-LF chunk delimiters, which the HTTP/1.1 parser now correctly rejects. Limit its framing data to CRLF while retaining chunk-size and read-path coverage.

  • Chunk framing
    foreach (string lineEnding in new[] { "\r\n" })
  • Scope
    Removes only invalid chunked framing; unrelated status-line and header LF coverage remains unchanged.

Customer Impact

Eliminates persistent outerloop failures across HTTP handler variants.

Regression

Test regression following strict CRLF enforcement for HTTP/1.1 chunked encoding.

Testing

The existing theory continues to cover both chunk-size ranges and synchronous/asynchronous stream consumption.

Risk

Low: test-data-only change aligned with RFC-compliant parser behavior.

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

Note

This PR description was generated by GitHub Copilot.

Copilot AI lite review requested due to automatic review settings August 11, 2026 09:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
16 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Co-authored-by: rzikm <32671551+rzikm@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 11, 2026 09:47
Copilot AI changed the title [WIP] Fix test failure for GetAsync_Chunked_VaryingSizeChunks_ReceivedCorrectly Use CRLF for chunked response framing test Aug 11, 2026
Copilot AI requested a review from rzikm August 11, 2026 09:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/libraries/Common/tests/System/Net/Http/HttpProtocolTests.cs:389

  • GetAsync_Chunked_VaryingSizeChunks_ReceivedCorrectly_MemberData still loops over a single-value lineEnding array. Now that only CRLF is valid, consider simplifying the MemberData generation to remove the redundant loop and avoid implying multiple line endings are being exercised.
            foreach (int maxChunkSize in new[] { 1, 10_000 })
                foreach (string lineEnding in new[] { "\r\n" })
                    foreach (bool useCopyToAsync in new[] { false, true })
                        yield return new object[] { maxChunkSize, lineEnding, useCopyToAsync };

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Test failure: GetAsync_Chunked_VaryingSizeChunks_ReceivedCorrectly fails with 'invalid chunk line ending' on all platforms (regression from #131138)

4 participants