httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r572419 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/proxy/mod_proxy_ftp.c modules/proxy/proxy_util.c
Date Mon, 03 Sep 2007 20:56:15 GMT
Author: rpluem
Date: Mon Sep  3 13:56:14 2007
New Revision: 572419

URL: http://svn.apache.org/viewvc?rev=572419&view=rev
Log:
Merge r562510 from trunk:

  *) mod_proxy: Improve network performance by setting APR_TCP_NODELAY
     (disable Nagle algorithm) on sockets if implemented.
     PR 42871 [Christian BOITEL <christian_boitel yahoo.fr>, Jim Jagielski]


Submitted by: Christian BOITEL <christian_boitel yahoo.fr>, jim
Reviewed by: rpluem, jim, fielding

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ftp.c
    httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=572419&r1=572418&r2=572419&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Mon Sep  3 13:56:14 2007
@@ -1,6 +1,10 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.6
 
+  *) mod_proxy: Improve network performance by setting APR_TCP_NODELAY
+     (disable Nagle algorithm) on sockets if implemented.
+     PR 42871 [Christian BOITEL <christian_boitel yahoo.fr>, Jim Jagielski]
+
   *) core: Do not replace a Date header set by a proxied backend server.
      PR 40232. [Ruediger Pluem]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=572419&r1=572418&r2=572419&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Mon Sep  3 13:56:14 2007
@@ -79,14 +79,6 @@
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * mod_proxy: Improve network performance by setting APR_TCP_NODELAY
-     (disable Nagle algorithm) on sockets if implemented. PR 42871.
-      Trunk version of patch:
-         http://svn.apache.org/viewcvs.cgi?rev=562510&view=rev
-      Backport version for 2.2.x of patch:
-         Trunk version of patch works
-      +1: rpluem, jim, fielding
-
     * mod_proxy: Ensure that at least scheme://hostname[:port] matches
       between worker and URL when trying to find the worker that fits best to
       the given URL. PR 40910.

Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ftp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ftp.c?rev=572419&r1=572418&r2=572419&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ftp.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ftp.c Mon Sep  3 13:56:14 2007
@@ -1233,6 +1233,12 @@
                 }
 #endif
 
+                rv = apr_socket_opt_set(data_sock, APR_TCP_NODELAY, 1);
+                if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+                                 "apr_socket_opt_set(APR_TCP_NODELAY): Failed to set");
+                }
+
                 /* make the connection */
                 apr_socket_addr_get(&data_addr, APR_REMOTE, sock);
                 apr_sockaddr_ip_get(&data_ip, data_addr);
@@ -1320,6 +1326,12 @@
                                   "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to set
ProxyReceiveBufferSize, using default");
                 }
 #endif
+
+                rv = apr_socket_opt_set(data_sock, APR_TCP_NODELAY, 1);
+                if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+                                 "apr_socket_opt_set(APR_TCP_NODELAY): Failed to set");
+                }
 
                 /* make the connection */
                 apr_sockaddr_info_get(&pasv_addr, apr_psprintf(p, "%d.%d.%d.%d", h3,
h2, h1, h0), connect_addr->family, pasvport, 0, p);

Modified: httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c?rev=572419&r1=572418&r2=572419&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c Mon Sep  3 13:56:14 2007
@@ -1498,6 +1498,13 @@
         }
 #endif
 
+        rv = apr_socket_opt_set(*newsock, APR_TCP_NODELAY, 1);
+        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+             ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+                          "apr_socket_opt_set(APR_TCP_NODELAY): "
+                          "Failed to set");
+        }
+
         /* Set a timeout on the socket */
         if (conf->timeout_set == 1) {
             apr_socket_timeout_set(*newsock, conf->timeout);
@@ -2126,6 +2133,13 @@
                          "ProxyReceiveBufferSize, using default");
         }
 #endif
+
+        rv = apr_socket_opt_set(newsock, APR_TCP_NODELAY, 1);
+        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
+             ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+                          "apr_socket_opt_set(APR_TCP_NODELAY): "
+                          "Failed to set");
+        }
 
         /* Set a timeout on the socket */
         if (worker->timeout_set == 1) {



Mime
View raw message