| Index: runtime/bin/http_impl.dart
|
| diff --git a/samples/chat/http_impl.dart b/runtime/bin/http_impl.dart
|
| similarity index 99%
|
| rename from samples/chat/http_impl.dart
|
| rename to runtime/bin/http_impl.dart
|
| index 3124a3d115a4731c94537b1b08d0dd8f1cc60f8b..4d6ce761bca3447782356df11698d6aebe99df4c 100644
|
| --- a/samples/chat/http_impl.dart
|
| +++ b/runtime/bin/http_impl.dart
|
| @@ -934,7 +934,7 @@ class _HttpConnectionBase {
|
| if (bytesRead > 0) {
|
| int parsed = _httpParser.writeList(buffer, 0, bytesRead);
|
| if (parsed != bytesRead) {
|
| - print("Failed to parse HTTP data $parsed $bytesRead");
|
| + // TODO(sgjesse): Error handling.
|
| _socket.close();
|
| }
|
| }
|
| @@ -1032,8 +1032,6 @@ class _HttpConnection extends _HttpConnectionBase {
|
| // HTTP server waiting for socket connections. The connections are
|
| // managed by the server and as requests are received the request.
|
| class _HttpServer implements HttpServer {
|
| - _HttpServer () : _debugTrace = false;
|
| -
|
| void listen(String host, int port, [int backlog = 5]) {
|
|
|
| void connectionHandler(Socket socket) {
|
| @@ -1042,9 +1040,6 @@ class _HttpServer implements HttpServer {
|
| connection._connectionEstablished(socket);
|
| connection.requestReceived = _requestHandler;
|
| _connections.add(connection);
|
| - if (_debugTrace) {
|
| - print("New connection (total ${_connections.length} connections)");
|
| - }
|
| void disconnectHandler() {
|
| for (int i = 0; i < _connections.length; i++) {
|
| if (_connections[i] == connection) {
|
| @@ -1052,9 +1047,6 @@ class _HttpServer implements HttpServer {
|
| break;
|
| }
|
| }
|
| - if (_debugTrace) {
|
| - print("Closed connection (total ${_connections.length} connections)");
|
| - }
|
| }
|
| connection.disconnectHandler = disconnectHandler;
|
| void errorHandler(String errorMessage) {
|
| @@ -1084,7 +1076,6 @@ class _HttpServer implements HttpServer {
|
| List<_HttpConnection> _connections; // List of currently connected clients.
|
| Function _requestHandler;
|
| Function _errorHandler;
|
| - bool _debugTrace;
|
| }
|
|
|
|
|
| @@ -1522,7 +1513,6 @@ class HttpUtil {
|
| static String decodeUrlEncodedString(String urlEncoded) {
|
| void invalidEscape() {
|
| // TODO(sgjesse): Handle the error.
|
| - print("Invalid escape code.");
|
| }
|
|
|
| StringBuffer result = new StringBuffer();
|
|
|