| 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 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2287 // If there is currently no eviction timer start one. | 2287 // If there is currently no eviction timer start one. |
| 2288 if (_evictionTimer == null) { | 2288 if (_evictionTimer == null) { |
| 2289 void _handleEviction(Timer timer) { | 2289 void _handleEviction(Timer timer) { |
| 2290 Date now = new Date.now(); | 2290 Date now = new Date.now(); |
| 2291 List<String> emptyKeys = new List<String>(); | 2291 List<String> emptyKeys = new List<String>(); |
| 2292 _openSockets.forEach( | 2292 _openSockets.forEach( |
| 2293 void _(String key, Queue<_SocketConnection> connections) { | 2293 void _(String key, Queue<_SocketConnection> connections) { |
| 2294 // As returned connections are added at the head of the | 2294 // As returned connections are added at the head of the |
| 2295 // list remove from the tail. | 2295 // list remove from the tail. |
| 2296 while (!connections.isEmpty) { | 2296 while (!connections.isEmpty) { |
| 2297 _SocketConnection socketConn = connections.last(); | 2297 _SocketConnection socketConn = connections.last; |
| 2298 if (socketConn._idleTime(now).inMilliseconds > | 2298 if (socketConn._idleTime(now).inMilliseconds > |
| 2299 DEFAULT_EVICTION_TIMEOUT) { | 2299 DEFAULT_EVICTION_TIMEOUT) { |
| 2300 connections.removeLast(); | 2300 connections.removeLast(); |
| 2301 socketConn._socket.close(); | 2301 socketConn._socket.close(); |
| 2302 if (connections.isEmpty) emptyKeys.add(key); | 2302 if (connections.isEmpty) emptyKeys.add(key); |
| 2303 } else { | 2303 } else { |
| 2304 break; | 2304 break; |
| 2305 } | 2305 } |
| 2306 } | 2306 } |
| 2307 }); | 2307 }); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2346 | 2346 |
| 2347 | 2347 |
| 2348 class _RedirectInfo implements RedirectInfo { | 2348 class _RedirectInfo implements RedirectInfo { |
| 2349 const _RedirectInfo(int this.statusCode, | 2349 const _RedirectInfo(int this.statusCode, |
| 2350 String this.method, | 2350 String this.method, |
| 2351 Uri this.location); | 2351 Uri this.location); |
| 2352 final int statusCode; | 2352 final int statusCode; |
| 2353 final String method; | 2353 final String method; |
| 2354 final Uri location; | 2354 final Uri location; |
| 2355 } | 2355 } |
| OLD | NEW |