| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library http_multi_server.multi_headers; | |
| 6 | |
| 7 import 'dart:io'; | 5 import 'dart:io'; |
| 8 | 6 |
| 9 /// A class that delegates header access and setting to many [HttpHeaders] | 7 /// A class that delegates header access and setting to many [HttpHeaders] |
| 10 /// instances. | 8 /// instances. |
| 11 class MultiHeaders implements HttpHeaders { | 9 class MultiHeaders implements HttpHeaders { |
| 12 /// The wrapped headers. | 10 /// The wrapped headers. |
| 13 final Set<HttpHeaders> _headers; | 11 final Set<HttpHeaders> _headers; |
| 14 | 12 |
| 15 bool get chunkedTransferEncoding => _headers.first.chunkedTransferEncoding; | 13 bool get chunkedTransferEncoding => _headers.first.chunkedTransferEncoding; |
| 16 set chunkedTransferEncoding(bool value) { | 14 set chunkedTransferEncoding(bool value) { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 String value(String name) => _headers.first.value(name); | 112 String value(String name) => _headers.first.value(name); |
| 115 | 113 |
| 116 List<String> operator[](String name) => _headers.first[name]; | 114 List<String> operator[](String name) => _headers.first[name]; |
| 117 | 115 |
| 118 void clear() { | 116 void clear() { |
| 119 for (var headers in _headers) { | 117 for (var headers in _headers) { |
| 120 headers.clear(); | 118 headers.clear(); |
| 121 } | 119 } |
| 122 } | 120 } |
| 123 } | 121 } |
| OLD | NEW |