| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 class _HttpHeaders implements HttpHeaders { | 7 class _HttpHeaders implements HttpHeaders { |
| 8 _HttpHeaders(String this.protocolVersion) | 8 _HttpHeaders(String this.protocolVersion) |
| 9 : _headers = new Map<String, List<String>>(); | 9 : _headers = new Map<String, List<String>>(); |
| 10 | 10 |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 int index = _value.indexOf("/"); | 625 int index = _value.indexOf("/"); |
| 626 if (index == -1 || index == (_value.length - 1)) { | 626 if (index == -1 || index == (_value.length - 1)) { |
| 627 _primaryType = _value.trim().toLowerCase(); | 627 _primaryType = _value.trim().toLowerCase(); |
| 628 _subType = ""; | 628 _subType = ""; |
| 629 } else { | 629 } else { |
| 630 _primaryType = _value.substring(0, index).trim().toLowerCase(); | 630 _primaryType = _value.substring(0, index).trim().toLowerCase(); |
| 631 _subType = _value.substring(index + 1).trim().toLowerCase(); | 631 _subType = _value.substring(index + 1).trim().toLowerCase(); |
| 632 } | 632 } |
| 633 } | 633 } |
| 634 | 634 |
| 635 String get mimeType => '$primaryType/$subType'; |
| 636 |
| 635 String get primaryType => _primaryType; | 637 String get primaryType => _primaryType; |
| 636 | 638 |
| 637 String get subType => _subType; | 639 String get subType => _subType; |
| 638 | 640 |
| 639 String get charset => parameters["charset"]; | 641 String get charset => parameters["charset"]; |
| 640 } | 642 } |
| 641 | 643 |
| 642 | 644 |
| 643 class _Cookie implements Cookie { | 645 class _Cookie implements Cookie { |
| 644 _Cookie([String this.name, String this.value]); | 646 _Cookie([String this.name, String this.value]); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 | 764 |
| 763 String name; | 765 String name; |
| 764 String value; | 766 String value; |
| 765 DateTime expires; | 767 DateTime expires; |
| 766 int maxAge; | 768 int maxAge; |
| 767 String domain; | 769 String domain; |
| 768 String path; | 770 String path; |
| 769 bool httpOnly = false; | 771 bool httpOnly = false; |
| 770 bool secure = false; | 772 bool secure = false; |
| 771 } | 773 } |
| OLD | NEW |