Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: runtime/bin/http_impl.dart

Issue 9488008: Include HTTP library in the standalone VM (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor update Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/http.dart ('k') | runtime/bin/io_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « runtime/bin/http.dart ('k') | runtime/bin/io_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698