| 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 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2004 proxies.add(new _Proxy(host, port)); | 2004 proxies.add(new _Proxy(host, port)); |
| 2005 } else if (proxy.trim() == DIRECT_PREFIX) { | 2005 } else if (proxy.trim() == DIRECT_PREFIX) { |
| 2006 proxies.add(new _Proxy.direct()); | 2006 proxies.add(new _Proxy.direct()); |
| 2007 } else { | 2007 } else { |
| 2008 throw new HttpException("Invalid proxy configuration $configuration"); | 2008 throw new HttpException("Invalid proxy configuration $configuration"); |
| 2009 } | 2009 } |
| 2010 } | 2010 } |
| 2011 }); | 2011 }); |
| 2012 } | 2012 } |
| 2013 const _ProxyConfiguration.direct() | 2013 const _ProxyConfiguration.direct() |
| 2014 : proxies = [const _Proxy.direct()]; | 2014 : proxies = const [const _Proxy.direct()]; |
| 2015 | 2015 |
| 2016 final List<_Proxy> proxies; | 2016 final List<_Proxy> proxies; |
| 2017 } | 2017 } |
| 2018 | 2018 |
| 2019 class _Proxy { | 2019 class _Proxy { |
| 2020 const _Proxy(this.host, this.port) : isDirect = false; | 2020 const _Proxy(this.host, this.port) : isDirect = false; |
| 2021 const _Proxy.direct() : host = null, port = null, isDirect = true; | 2021 const _Proxy.direct() : host = null, port = null, isDirect = true; |
| 2022 | 2022 |
| 2023 final String host; | 2023 final String host; |
| 2024 final int port; | 2024 final int port; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2272 | 2272 |
| 2273 | 2273 |
| 2274 class _RedirectInfo implements RedirectInfo { | 2274 class _RedirectInfo implements RedirectInfo { |
| 2275 const _RedirectInfo(int this.statusCode, | 2275 const _RedirectInfo(int this.statusCode, |
| 2276 String this.method, | 2276 String this.method, |
| 2277 Uri this.location); | 2277 Uri this.location); |
| 2278 final int statusCode; | 2278 final int statusCode; |
| 2279 final String method; | 2279 final String method; |
| 2280 final Uri location; | 2280 final Uri location; |
| 2281 } | 2281 } |
| OLD | NEW |