Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: runtime/bin/http_impl.dart

Issue 10909057: Use correct cookie date parsing for cookie 'expires' field. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review update. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/http_utils.dart » ('j') | runtime/bin/http_utils.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class _HttpHeaders implements HttpHeaders { 5 class _HttpHeaders implements HttpHeaders {
6 _HttpHeaders() : _headers = new Map<String, List<String>>(); 6 _HttpHeaders() : _headers = new Map<String, List<String>>();
7 7
8 List<String> operator[](String name) { 8 List<String> operator[](String name) {
9 name = name.toLowerCase(); 9 name = name.toLowerCase();
10 return _headers[name]; 10 return _headers[name];
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } 527 }
528 528
529 while (!done()) { 529 while (!done()) {
530 String name = parseAttributeName(); 530 String name = parseAttributeName();
531 String value = ""; 531 String value = "";
532 if (!done() && s[index] == "=") { 532 if (!done() && s[index] == "=") {
533 index++; // Skip the = character. 533 index++; // Skip the = character.
534 value = parseAttributeValue(); 534 value = parseAttributeValue();
535 } 535 }
536 if (name == "expires") { 536 if (name == "expires") {
537 expires = _HttpUtils.parseDate(value, strict: false); 537 expires = _HttpUtils.parseCookieDate(value);
538 } else if (name == "max-age") { 538 } else if (name == "max-age") {
539 maxAge = parseInt(value); 539 maxAge = parseInt(value);
540 } else if (name == "domain") { 540 } else if (name == "domain") {
541 domain = value; 541 domain = value;
542 } else if (name == "path") { 542 } else if (name == "path") {
543 path = value; 543 path = value;
544 } else if (name == "httponly") { 544 } else if (name == "httponly") {
545 httpOnly = true; 545 httpOnly = true;
546 } else if (name == "secure") { 546 } else if (name == "secure") {
547 secure = true; 547 secure = true;
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 2166
2167 2167
2168 class _RedirectInfo implements RedirectInfo { 2168 class _RedirectInfo implements RedirectInfo {
2169 const _RedirectInfo(int this.statusCode, 2169 const _RedirectInfo(int this.statusCode,
2170 String this.method, 2170 String this.method,
2171 Uri this.location); 2171 Uri this.location);
2172 final int statusCode; 2172 final int statusCode;
2173 final String method; 2173 final String method;
2174 final Uri location; 2174 final Uri location;
2175 } 2175 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/http_utils.dart » ('j') | runtime/bin/http_utils.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698