httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameer Parekh <sam...@hyperreal.org>
Subject cvs commit: apache/src/modules/proxy mod_proxy.c mod_proxy.h proxy_ftp.c proxy_http.c
Date Fri, 01 Aug 1997 04:58:05 GMT
sameer      97/07/31 21:58:04

  Modified:    src       CHANGES
               src/modules/proxy  mod_proxy.c mod_proxy.h proxy_ftp.c
                        proxy_http.c
  Log:
  Support ReceiveBufferSize. (Yes, I did test it.)
  
  Reviewed By: Sameer Parekh, Brian Behlendorf
  Submitted By: Phillip A. Prindeville
  
  Revision  Changes    Path
  1.375     +4 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.374
  retrieving revision 1.375
  diff -c -u -r1.374 -r1.375
  /usr/bin/diff: conflicting specifications of output style
  --- CHANGES	1997/07/31 20:56:23	1.374
  +++ CHANGES	1997/08/01 04:57:58	1.375
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3a2
   
  +  *) mod_proxy now has a ReceiveBufferSize directive, similar to
  +     SendBufferSize, so that the TCP window can be set appropriately
  +     for LFNs. [Phillip A. Prindeville]
  +
     *) mod_browser has been replaced by the more general mod_setenvif
        (courtesy of Paul Sutton).  BrowserMatch* directives are still
        available, but are now joined by SetEnvIf*, UnSetEnvIf*, and
  
  
  
  1.21      +17 -0     apache/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -c -u -r1.20 -r1.21
  /usr/bin/diff: conflicting specifications of output style
  --- mod_proxy.c	1997/07/28 18:23:29	1.20
  +++ mod_proxy.c	1997/08/01 04:58:01	1.21
  @@ -682,6 +682,21 @@
       return NULL;
   }
   
  +static const char *
  +set_recv_buffer_size (cmd_parms *parms, void *dummy, char *arg)
  +{
  +    proxy_server_conf *psf =
  +	get_module_config (parms->server->module_config, &proxy_module);
  +    int s = atoi (arg);
  +    if (s < 512 && s != 0)
  +    {
  +        return "ReceiveBufferSize must be >= 512 bytes, or 0 for system default.";
  +    }
  +
  +    psf->recv_buffer_size = s;
  +    return NULL;
  +}
  +
   static handler_rec proxy_handlers[] = {
   { "proxy-server", proxy_handler },
   { NULL } 
  @@ -718,6 +733,8 @@
       "The number of characters in subdirectory names" },
   { "NoCache", set_cache_exclude, NULL, RSRC_CONF, ITERATE,
       "A list of names, hosts or domains for which caching is *not* provided" },
  +{ "ReceiveBufferSize", set_recv_buffer_size, NULL, RSRC_CONF, TAKE1,
  +    "Receive buffer size in bytes" },
   { NULL }
   };
   
  
  
  
  1.16      +1 -0      apache/src/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/mod_proxy.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -c -u -r1.15 -r1.16
  /usr/bin/diff: conflicting specifications of output style
  --- mod_proxy.h	1997/07/21 05:54:03	1.15
  +++ mod_proxy.h	1997/08/01 04:58:01	1.16
  @@ -196,6 +196,7 @@
       array_header *nocaches;
       char         *domain;    /* domain name to use in absence of a domain name in the request
*/
       int req;                 /* true if proxy requests are enabled */
  +    int recv_buffer_size;
   } proxy_server_conf;
   
   struct hdr_entry
  
  
  
  1.28      +18 -0     apache/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -c -u -r1.27 -r1.28
  /usr/bin/diff: conflicting specifications of output style
  --- proxy_ftp.c	1997/07/27 03:13:33	1.27
  +++ proxy_ftp.c	1997/08/01 04:58:02	1.28
  @@ -499,6 +499,16 @@
       }
       note_cleanups_for_socket(pool, sock);
   
  +    if (conf->recv_buffer_size) {
  +      if (setsockopt(dsock, SOL_SOCKET, SO_RCVBUF,
  +		     (const char *) &conf->recv_buffer_size, sizeof(int))
  +	  == -1) {
  +	proxy_log_uerror("setsockopt", "(SO_RCVBUF)",
  +			 "Failed to set RecvBufferSize, using default",
  +			 r->server);
  +      }
  +    }
  +
       if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&one,
   		   sizeof(one)) == -1)
       {
  @@ -684,6 +694,14 @@
           return SERVER_ERROR;
       }
       note_cleanups_for_socket(pool, dsock);
  +
  +    if (conf->recv_buffer_size) {
  +    	if (setsockopt(dsock, SOL_SOCKET, SO_RCVBUF,
  +		(const char *)&conf->recv_buffer_size, sizeof(int)) == -1) {
  +	    proxy_log_uerror("setsockopt", "(SO_RCVBUF)",
  +		"Failed to set RecvBufferSize, using default", r->server);
  +	}
  +    }
   
       bputs("PASV\015\012", f);
       bflush(f);
  
  
  
  1.24      +10 -1     apache/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -c -u -r1.23 -r1.24
  /usr/bin/diff: conflicting specifications of output style
  --- proxy_http.c	1997/07/27 03:13:33	1.23
  +++ proxy_http.c	1997/08/01 04:58:02	1.24
  @@ -226,7 +226,16 @@
       }
       note_cleanups_for_socket(pool, sock);
   
  -    
  +    if (conf->recv_buffer_size) {
  +      if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
  +		     (const char *)&conf->recv_buffer_size, sizeof(int))
  +	  == -1) {
  +	proxy_log_uerror("setsockopt", "(SO_RCVBUF)",
  +			 "Failed to set RecvBufferSize, using default",
  +			 r->server);
  +      }
  +    }
  +
   #ifdef SINIX_D_RESOLVER_BUG
       { struct in_addr *ip_addr = (struct in_addr *) *server_hp.h_addr_list;
   
  
  
  

Mime
View raw message