| 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; | 5 library http_multi_server.multi_headers; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 /// A class that delegates header access and setting to many [HttpHeaders] | 9 /// A class that delegates header access and setting to many [HttpHeaders] |
| 10 /// instances. | 10 /// instances. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 _headers.first.forEach(f); | 88 _headers.first.forEach(f); |
| 89 | 89 |
| 90 void noFolding(String name) { | 90 void noFolding(String name) { |
| 91 for (var headers in _headers) { | 91 for (var headers in _headers) { |
| 92 headers.noFolding(name); | 92 headers.noFolding(name); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 void remove(String name, Object value) { | 96 void remove(String name, Object value) { |
| 97 for (var headers in _headers) { | 97 for (var headers in _headers) { |
| 98 headers.remove(name); | 98 headers.remove(name, value); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 | 101 |
| 102 void removeAll(String name) { | 102 void removeAll(String name) { |
| 103 for (var headers in _headers) { | 103 for (var headers in _headers) { |
| 104 headers.removeAll(name, value); | 104 headers.removeAll(name); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 void set(String name, Object value) { | 108 void set(String name, Object value) { |
| 109 for (var headers in _headers) { | 109 for (var headers in _headers) { |
| 110 headers.set(name, value); | 110 headers.set(name, value); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 String value(String name) => _headers.first.value(name); | 114 String value(String name) => _headers.first.value(name); |
| 115 | 115 |
| 116 List<String> operator[](String name) => _headers.first[name]; | 116 List<String> operator[](String name) => _headers.first[name]; |
| 117 |
| 118 void clear() { |
| 119 for (var headers in _headers) { |
| 120 headers.clear(); |
| 121 } |
| 122 } |
| 117 } | 123 } |
| OLD | NEW |