From 1c56e6d7e4f7f80eab3a630ce81b2b6481072121 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 7 Mar 2011 17:45:10 +0100 Subject: [PATCH] src/connection.c: Minor source comment fixes. --- src/connection.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/connection.c b/src/connection.c index a42fbe0..418c424 100644 --- a/src/connection.c +++ b/src/connection.c @@ -28,9 +28,9 @@ #include -/* Maximum line of the request line. Longer request lines are aborted with an - * error. The standard doesn't specify a maximum line length but this should - * be a good limit to make processing simpler. */ +/* Maximum line of a HTTP request line. Longer request lines are aborted with + * an error. The standard doesn't specify a maximum line length but this + * should be a good limit to make processing simpler. */ #define MAX_REQUEST_LINE 4096 @@ -72,7 +72,7 @@ void handle_connection(int client_socket) { /* Read request line (CONNECT ..) and headers (they are discarded). */ result = read_http_request(client_fd, buffer, sizeof(buffer)); if (-1 == result) { - /* Read error. */ + /* Read error, client_fd already closed. */ return; } else if (-2 == result) { /* EOF */ @@ -121,7 +121,7 @@ void handle_connection(int client_socket) { /* Read response line from proxy server. */ result = read_http_request(server_fd, buffer, sizeof(buffer)); if (-1 == result) { - /* Read error. */ + /* Read error, server_fd already closed. */ send_close_forwarding_failure(client_fd); return; } else if (-2 == result) { @@ -338,7 +338,7 @@ static int connect_to_host(const char *hostname, const char *port) { /* Parse HTTP CONNECT request string and save its parameters. * - * The following format is expected: "CONNECT host:port HTTP/1.y". + * The following format is expected: "CONNECT host:port HTTP/1.x". * * request and host must have the same size! port must be at least 6 bytes * long (5 + '\0'). -- 2.45.2