| 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 } | 969 } |
| 970 }; | 970 }; |
| 971 connection._connectionEstablished(socket); | 971 connection._connectionEstablished(socket); |
| 972 _connections.add(connection); | 972 _connections.add(connection); |
| 973 } | 973 } |
| 974 serverSocket.onConnection = onConnection; | 974 serverSocket.onConnection = onConnection; |
| 975 _server = serverSocket; | 975 _server = serverSocket; |
| 976 _closeServer = false; | 976 _closeServer = false; |
| 977 } | 977 } |
| 978 | 978 |
| 979 addRequestHandler(bool matcher(String path), | 979 addRequestHandler(bool matcher(HttpRequest request), |
| 980 void handler(HttpRequest request, HttpResponse response)) { | 980 void handler(HttpRequest request, HttpResponse response)) { |
| 981 _handlers.add(new _RequestHandlerRegistration(matcher, handler)); | 981 _handlers.add(new _RequestHandlerRegistration(matcher, handler)); |
| 982 } | 982 } |
| 983 | 983 |
| 984 void set defaultRequestHandler( | 984 void set defaultRequestHandler( |
| 985 void handler(HttpRequest request, HttpResponse response)) { | 985 void handler(HttpRequest request, HttpResponse response)) { |
| 986 _defaultHandler = handler; | 986 _defaultHandler = handler; |
| 987 } | 987 } |
| 988 | 988 |
| 989 void close() { | 989 void close() { |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 } | 1543 } |
| 1544 | 1544 |
| 1545 | 1545 |
| 1546 class _DetachedSocket implements DetachedSocket { | 1546 class _DetachedSocket implements DetachedSocket { |
| 1547 _DetachedSocket(this._socket, this._unparsedData); | 1547 _DetachedSocket(this._socket, this._unparsedData); |
| 1548 Socket get socket() => _socket; | 1548 Socket get socket() => _socket; |
| 1549 List<int> get unparsedData() => _unparsedData; | 1549 List<int> get unparsedData() => _unparsedData; |
| 1550 Socket _socket; | 1550 Socket _socket; |
| 1551 List<int> _unparsedData; | 1551 List<int> _unparsedData; |
| 1552 } | 1552 } |
| OLD | NEW |