[L] Change in dart/sdk[main]: Fix cookie-date parsing to use the correct algorithm.

0 views
Skip to first unread message

Martin Kustermann (Gerrit)

unread,
Apr 21, 2026, 8:39:29 AM (yesterday) Apr 21
to Lasse Nielsen, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Lasse Nielsen

Martin Kustermann voted and added 2 comments

Votes added by Martin Kustermann

Code-Review+1

2 comments

Commit Message
Line 11, Patchset 1 (Latest):produce, rather than what the RFC specifies should be accepted.
Martin Kustermann . unresolved

Could you like to a bug?
Could you link to the "prior parser change"?

File sdk/lib/_http/http_date.dart
Line 153, Patchset 1 (Latest): bool maybeExpectChar(int charCode) {
Martin Kustermann . unresolved

There's only one call site of this left now, you may inline it into `expectChar`.

Open in Gerrit

Related details

Attention is currently required from:
  • Lasse Nielsen
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I4ed7cf2368d04063e0fc563ff8e64904bf0d3e1e
Gerrit-Change-Number: 496080
Gerrit-PatchSet: 1
Gerrit-Owner: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Attention: Lasse Nielsen <l...@google.com>
Gerrit-Comment-Date: Tue, 21 Apr 2026 12:39:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Lasse Nielsen (Gerrit)

unread,
8:38 AM (3 hours ago) 8:38 AM
to Martin Kustermann, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org

Lasse Nielsen added 2 comments

Commit Message
Line 11, Patchset 1:produce, rather than what the RFC specifies should be accepted.
Martin Kustermann . resolved

Could you like to a bug?
Could you link to the "prior parser change"?

Lasse Nielsen

Done

File sdk/lib/_http/http_date.dart
Line 153, Patchset 1: bool maybeExpectChar(int charCode) {
Martin Kustermann . resolved

There's only one call site of this left now, you may inline it into `expectChar`.

Lasse Nielsen

Done

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I4ed7cf2368d04063e0fc563ff8e64904bf0d3e1e
Gerrit-Change-Number: 496080
Gerrit-PatchSet: 3
Gerrit-Owner: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Comment-Date: Wed, 22 Apr 2026 12:38:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Martin Kustermann <kuste...@google.com>
satisfied_requirement
open
diffy

Lasse Nielsen (Gerrit)

unread,
8:39 AM (3 hours ago) 8:39 AM
to Martin Kustermann, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org

Lasse Nielsen voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I4ed7cf2368d04063e0fc563ff8e64904bf0d3e1e
Gerrit-Change-Number: 496080
Gerrit-PatchSet: 3
Gerrit-Owner: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Comment-Date: Wed, 22 Apr 2026 12:39:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

unread,
9:14 AM (2 hours ago) 9:14 AM
to Lasse Nielsen, Martin Kustermann, rev...@dartlang.org

dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change with unreviewed changes

Unreviewed changes

1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: sdk/lib/_http/http_date.dart
Insertions: 3, Deletions: 7.

@@ -150,16 +150,12 @@
onError(source, start, end);
}

- bool maybeExpectChar(int charCode) {
+ void expectChar(int charCode) {
if (index < end && source.codeUnitAt(index) == charCode) {
index++;
- return true;
+ } else {
+ throwError();
}
- return false;
- }
-
- void expectChar(int charCode) {
- if (!maybeExpectChar(charCode)) throwError();
}

// Detects one of three recognized formats.
```

Change information

Commit message:
Fix cookie-date parsing to use the correct algorithm.

A prior parser change made the parsing more restrictive,
only accepting the dart formats that a cookie creator should

produce, rather than what the RFC specifies should be accepted.

Now implements the specified algorithm again.

Bug: https://github.com/dart-lang/sdk/issues/62721

Prior over-optimisitc breaking change: https://dart-review.googlesource.com/c/sdk/+/448383
Change-Id: I4ed7cf2368d04063e0fc563ff8e64904bf0d3e1e
Reviewed-by: Martin Kustermann <kuste...@google.com>
Commit-Queue: Lasse Nielsen <l...@google.com>
Files:
  • M CHANGELOG.md
  • M sdk/lib/_http/http_date.dart
  • M sdk/lib/_http/http_parser.dart
  • M tests/standalone/io/http_cookie_date_test.dart
Change size: L
Delta: 4 files changed, 597 insertions(+), 44 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Martin Kustermann
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I4ed7cf2368d04063e0fc563ff8e64904bf0d3e1e
Gerrit-Change-Number: 496080
Gerrit-PatchSet: 4
Gerrit-Owner: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages