| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |