97909b6bca
Avoid doing unnecessary allocations, don't use `String.operator[]` to access single characters, or creating substrings that are not needed. Reuse the date-parser for cookie dates, instead of having two separate parsers. The cookie-date-parser was very forgiving, and only tested very little. It's unlikely that there will be wildly different cookie formats in actual use, when the specification only allows for one format. Change-Id: I81b3620cc4476af3584b859f9c1eb80362f83979 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448383 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Lasse Nielsen <lrn@google.com>