]> granicus.if.org Git - apache/commitdiff
Fix logic in connect handler from previous patch
authorChuck Murcko <chuck@apache.org>
Fri, 13 Apr 2001 09:34:47 +0000 (09:34 +0000)
committerChuck Murcko <chuck@apache.org>
Fri, 13 Apr 2001 09:34:47 +0000 (09:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88845 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_connect.c

index 2c9bfc5c9e5307437ca9afa347c0d1b97b8402b4..9de0fcdf5b0100d04974bd00327c6955466b6fd3 100644 (file)
@@ -331,9 +331,9 @@ int ap_proxy_connect_handler(request_rec *r, char *url,
                     int o = 0;
                     while(nbytes)
                     {
-                        i = nbytes;
                        if (apr_send(r->connection->client_socket, buffer + o, &nbytes) != APR_SUCCESS)
                            break;
+                        i = nbytes;
                         o += i;
                         nbytes -= i;
                     }
@@ -354,9 +354,9 @@ int ap_proxy_connect_handler(request_rec *r, char *url,
                     int o = 0;
                     while(nbytes)
                     {
-                        i = nbytes;
                        if (apr_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
                            break;
+                        i = nbytes;
                         o += i;
                         nbytes -= i;
                     }