Skip to content

Normalize bare CR line endings in SMTP message output - #136716

Merged
MihaZupan merged 1 commit into
dotnet:mainfrom
MihaZupan:mail-barecr
Nov 2, 2026
Merged

MihaZupan merged 1 commit into
dotnet:mainfrom
MihaZupan:mail-barecr

Conversation

@MihaZupan

@MihaZupan MihaZupan commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Normalize bare carriage returns to CRLF in EightBitStream when SMTP transport encoding is enabled, matching the existing handling of bare line feeds. This ensures dots following either kind of line ending are escaped consistently.

Emit CRLF immediately rather than deferring a trailing CR, and consume a following LF without emitting another newline, including when CRLF is split across writes. This also removes the need to emit pending data during disposal. Streams with transport encoding disabled continue to pass bytes through unchanged.

Note

These changes and this description were prepared with assistance from GitHub Copilot.

And while we're at it, use the vectorized IndexOfAny instead.

@MihaZupan MihaZupan added this to the 12.0.0 milestone Oct 30, 2026
@MihaZupan MihaZupan self-assigned this Oct 30, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 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: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@rzikm rzikm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, Thanks!

@MihaZupan

Copy link
Copy Markdown
Member Author

/ba-g HTTP test OOM is unrelated

@MihaZupan
MihaZupan merged commit 4cce8c2 into dotnet:main Nov 2, 2026
97 of 99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants