-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit 97909b6
Update the cookie and cookie-date parsers.
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>1 parent 60b72cb commit 97909b6
File tree
10 files changed
+808
-654
lines changed- sdk/lib/_http
- tests/standalone/io
10 files changed
+808
-654
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | - | ||
626 | - | ||
627 | - | ||
625 | + | ||
628 | 626 | | |
629 | 627 | | |
630 | 628 | | |
| |||
636 | 634 | | |
637 | 635 | | |
638 | 636 | | |
639 | - | ||
640 | - | ||
637 | + | ||
638 | + | ||
641 | 639 | | |
642 | 640 | | |
643 | 641 | | |
| |||
829 | 827 | | |
830 | 828 | | |
831 | 829 | | |
832 | - | ||
830 | + | ||
833 | 831 | | |
834 | 832 | | |
835 | 833 | | |
| |||
840 | 838 | | |
841 | 839 | | |
842 | 840 | | |
843 | - | ||
841 | + | ||
844 | 842 | | |
845 | 843 | | |
846 | - | ||
844 | + | ||
847 | 845 | | |
848 | 846 | | |
849 | 847 | | |
850 | - | ||
848 | + | ||
851 | 849 | | |
852 | 850 | | |
853 | - | ||
851 | + | ||
854 | 852 | | |
855 | 853 | | |
856 | - | ||
854 | + | ||
857 | 855 | | |
858 | 856 | | |
859 | - | ||
857 | + | ||
860 | 858 | | |
861 | 859 | | |
862 | 860 | | |
863 | - | ||
861 | + | ||
864 | 862 | | |
865 | 863 | | |
866 | 864 | | |
867 | 865 | | |
868 | 866 | | |
869 | 867 | | |
870 | - | ||
868 | + | ||
871 | 869 | | |
872 | 870 | | |
873 | 871 | | |
| |||
0 commit comments