httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Fielding <field...@hyperreal.com>
Subject cvs commit: apache/src CHANGES http_main.c
Date Sat, 15 Feb 1997 12:26:21 GMT
fielding    97/02/15 04:26:21

  Modified:    src       CHANGES http_main.c
  Log:
  Replace sock_disable_nagle with a NOOP if the compiler doesn't
  understand the TCP_NODELAY option.
  
  Submitted by: Roy Fielding, based on Marc Slemko's patch
  
  Revision  Changes    Path
  1.160     +3 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.159
  retrieving revision 1.160
  diff -C3 -r1.159 -r1.160
  *** CHANGES	1997/02/11 17:02:03	1.159
  --- CHANGES	1997/02/15 12:26:19	1.160
  ***************
  *** 1,5 ****
  --- 1,8 ----
    Changes with Apache 1.2b7
    
  +   *) Don't disable Nagle algorithm if system doesn't have TCP_NODELAY.
  +      [Marc Slemko and Roy Fielding]
  + 
      *) Fixed problem with mod_cgi-generated internal redirects trying to
         read the request message-body twice. [Archie Cobbs and Roy Fielding]
    
  
  
  
  1.120     +9 -10     apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -C3 -r1.119 -r1.120
  *** http_main.c	1997/02/11 15:55:20	1.119
  --- http_main.c	1997/02/15 12:26:20	1.120
  ***************
  *** 1493,1520 ****
        return conn;
    }
    
  ! void sock_disable_nagle (int s)
    {
  !     /*
  !      * The Nagle algorithm says that we should delay sending partial
         * packets in hopes of getting more data.  We don't want to do
         * this; we are not telnet.  There are bad interactions between
         * P-HTTP and Nagle's algorithm that have very severe performance
         * penalties.  (Failing to do disable Nagle is not much of a
  !      * problem with simple HTTP.)  A better description of these
  !      * problems is in preparation; contact me for details.
  !      * -John Heidemann <johnh@isi.edu>.
         *
         * In spite of these problems, failure here is not a shooting offense.
         */
        const int just_say_no = 1;
  ! #ifndef MPE
  ! /* MPE does not support TCP_NODELAY */
        if (0 != setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&just_say_no,
  ! 			sizeof(just_say_no)))
    	fprintf(stderr, "httpd: could not set socket option TCP_NODELAY\n");
  - #endif
    }
    
    /*****************************************************************
     * Child process main loop.
  --- 1493,1519 ----
        return conn;
    }
    
  ! #if defined(TCP_NODELAY)
  ! static void sock_disable_nagle (int s)
    {
  !     /* The Nagle algorithm says that we should delay sending partial
         * packets in hopes of getting more data.  We don't want to do
         * this; we are not telnet.  There are bad interactions between
         * P-HTTP and Nagle's algorithm that have very severe performance
         * penalties.  (Failing to do disable Nagle is not much of a
  !      * problem with simple HTTP.)
         *
         * In spite of these problems, failure here is not a shooting offense.
         */
        const int just_say_no = 1;
  ! 
        if (0 != setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&just_say_no,
  ! 			sizeof just_say_no))
    	fprintf(stderr, "httpd: could not set socket option TCP_NODELAY\n");
    }
  + #else
  + #define sock_disable_nagle(s) /* NOOP */
  + #endif
    
    /*****************************************************************
     * Child process main loop.
  
  
  

Mime
View raw message