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 final Map<String, List<String>> _headers; | 8 final Map<String, List<String>> _headers; |
9 final String protocolVersion; | 9 final String protocolVersion; |
10 | 10 |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 return value; | 605 return value; |
606 } | 606 } |
607 } | 607 } |
608 | 608 |
609 | 609 |
610 class _HeaderValue implements HeaderValue { | 610 class _HeaderValue implements HeaderValue { |
611 String _value; | 611 String _value; |
612 Map<String, String> _parameters; | 612 Map<String, String> _parameters; |
613 Map<String, String> _unmodifiableParameters; | 613 Map<String, String> _unmodifiableParameters; |
614 | 614 |
615 _HeaderValue([String this._value = "", Map<String, String> parameters]) { | 615 _HeaderValue([this._value = "", Map<String, String> parameters]) { |
616 if (parameters != null) { | 616 if (parameters != null) { |
617 _parameters = new HashMap<String, String>.from(parameters); | 617 _parameters = new HashMap<String, String>.from(parameters); |
618 } | 618 } |
619 } | 619 } |
620 | 620 |
621 static _HeaderValue parse(String value, | 621 static _HeaderValue parse(String value, |
622 {parameterSeparator: ";", | 622 {parameterSeparator: ";", |
623 valueSeparator: null, | 623 valueSeparator: null, |
624 preserveBackslash: false}) { | 624 preserveBackslash: false}) { |
625 // Parse the string. | 625 // Parse the string. |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 (codeUnit >= 0x23 && codeUnit <= 0x2B) || | 980 (codeUnit >= 0x23 && codeUnit <= 0x2B) || |
981 (codeUnit >= 0x2D && codeUnit <= 0x3A) || | 981 (codeUnit >= 0x2D && codeUnit <= 0x3A) || |
982 (codeUnit >= 0x3C && codeUnit <= 0x5B) || | 982 (codeUnit >= 0x3C && codeUnit <= 0x5B) || |
983 (codeUnit >= 0x5D && codeUnit <= 0x7E))) { | 983 (codeUnit >= 0x5D && codeUnit <= 0x7E))) { |
984 throw new FormatException( | 984 throw new FormatException( |
985 "Invalid character in cookie value, code unit: '$codeUnit'"); | 985 "Invalid character in cookie value, code unit: '$codeUnit'"); |
986 } | 986 } |
987 } | 987 } |
988 } | 988 } |
989 } | 989 } |
OLD | NEW |