Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP] ContentType with utf-8 not encoded properly in Dart 3.6 #59813

Open
brianquinlan opened this issue Dec 26, 2024 · 1 comment
Open

[CP] ContentType with utf-8 not encoded properly in Dart 3.6 #59813

brianquinlan opened this issue Dec 26, 2024 · 1 comment
Assignees
Labels
area-sdk Use area-sdk for general purpose SDK issues (packaging, distribution, …). cherry-pick-review Issue that need cherry pick triage to approve triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@brianquinlan
Copy link
Contributor

Commit(s) to merge

https://dart-review.googlesource.com/c/sdk/+/402281

Target

stable

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/402422

Issue Description

HttpResponse.writeln does not honor the charset set by the developer. This is a regression from Dart 3.5.

What is the fix

Change the IOSink writeln method to delegate to its subclass' write method.

Why cherry-pick

The issue was found by a user. Any user using HttpServer with an explicit "Content-Type" and sending non-ISO-8859-1 (Latin-1) data might be affected.

Risk

Low.

The code change is a single line (that reverts a change made in another PR). The change includes 230 lines of tests that also pass in Dart 3.5 (but not in Dart 3.6).

Issue link(s)

#59719

Extra Info

No response

@brianquinlan brianquinlan added the cherry-pick-review Issue that need cherry pick triage to approve label Dec 26, 2024
@dart-github-bot
Copy link
Collaborator

Summary: Dart 3.6 HttpResponse.writeln incorrectly handles UTF-8 encoding in Content-Type, regressing from Dart 3.5 behavior. A one-line fix is proposed.

@dart-github-bot dart-github-bot added area-sdk Use area-sdk for general purpose SDK issues (packaging, distribution, …). triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-sdk Use area-sdk for general purpose SDK issues (packaging, distribution, …). cherry-pick-review Issue that need cherry pick triage to approve triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

6 participants