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 · 2 comments
Open

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

brianquinlan opened this issue Dec 26, 2024 · 2 comments
Assignees
Labels
area-sdk Use area-sdk for general purpose SDK issues (packaging, distribution, …). cherry-pick-approved Label for approved cherrypick request cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. cherry-pick-review Issue that need cherry pick triage to approve 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
@a-siva
Copy link
Contributor

a-siva commented Jan 2, 2025

lgtm

@itsjustkevin itsjustkevin added the cherry-pick-approved Label for approved cherrypick request label Jan 7, 2025
copybara-service bot pushed a commit that referenced this issue Jan 17, 2025
… charset.

Bug:#59719
Change-Id: Ief2f79d98a400f90d2098cd2f3cd8312325c91cb
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/402281
Cherry-pick-request: #59813
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402422
Reviewed-by: Kevin Moore <[email protected]>
Reviewed-by: Alexander Aprelev <[email protected]>
Commit-Queue: Brian Quinlan <[email protected]>
@lrhn lrhn removed the triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. label Jan 18, 2025
@athomas athomas added the cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. label Jan 23, 2025
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-approved Label for approved cherrypick request cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. cherry-pick-review Issue that need cherry pick triage to approve type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

8 participants