View | Details | Raw Unified | Return to bug 36038
Collapse All | Expand All

(-)httpd-2.0.54/include/ap_listen.h.orig (-1 / +5 lines)
Lines 102-107 Link Here
102
const char *ap_set_listener(cmd_parms *cmd, void *dummy, const char *ips);
102
const char *ap_set_listener(cmd_parms *cmd, void *dummy, const char *ips);
103
const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy,
103
const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy,
104
				    const char *arg);
104
				    const char *arg);
105
const char *ap_set_receive_buffer_size(cmd_parms *cmd, void *dummy,
106
				       const char *arg);
105
107
106
#define LISTEN_COMMANDS	\
108
#define LISTEN_COMMANDS	\
107
AP_INIT_TAKE1("ListenBacklog", ap_set_listenbacklog, NULL, RSRC_CONF, \
109
AP_INIT_TAKE1("ListenBacklog", ap_set_listenbacklog, NULL, RSRC_CONF, \
Lines 109-114 Link Here
109
AP_INIT_TAKE1("Listen", ap_set_listener, NULL, RSRC_CONF, \
111
AP_INIT_TAKE1("Listen", ap_set_listener, NULL, RSRC_CONF, \
110
  "A port number or a numeric IP address and a port number"), \
112
  "A port number or a numeric IP address and a port number"), \
111
AP_INIT_TAKE1("SendBufferSize", ap_set_send_buffer_size, NULL, RSRC_CONF, \
113
AP_INIT_TAKE1("SendBufferSize", ap_set_send_buffer_size, NULL, RSRC_CONF, \
112
  "Send buffer size in bytes")
114
  "Send buffer size in bytes"), \
115
AP_INIT_TAKE1("ReceiveBufferSize", ap_set_receive_buffer_size, NULL, RSRC_CONF, \
116
  "Receive buffer size in bytes")
113
117
114
#endif
118
#endif
(-)httpd-2.0.54/server/listen.c.orig (+29 lines)
Lines 40-45 Link Here
40
static ap_listen_rec *old_listeners;
40
static ap_listen_rec *old_listeners;
41
static int ap_listenbacklog;
41
static int ap_listenbacklog;
42
static int send_buffer_size;
42
static int send_buffer_size;
43
static int receive_buffer_size;
43
44
44
/* TODO: make_sock is just begging and screaming for APR abstraction */
45
/* TODO: make_sock is just begging and screaming for APR abstraction */
45
static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
46
static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
Lines 118-123 Link Here
118
            /* not a fatal error */
119
            /* not a fatal error */
119
        }
120
        }
120
    }
121
    }
122
    if (receive_buffer_size) {
123
        stat = apr_socket_opt_set(s, APR_SO_RCVBUF, receive_buffer_size);
124
        if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
125
            ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p,
126
                          "make_sock: failed to set ReceiveBufferSize for "
127
                          "address %pI, using default",
128
                          server->bind_addr);
129
            /* not a fatal error */
130
        }
131
    }
121
132
122
#if APR_TCP_NODELAY_INHERITED
133
#if APR_TCP_NODELAY_INHERITED
123
    ap_sock_disable_nagle(s);
134
    ap_sock_disable_nagle(s);
Lines 462-464 Link Here
462
    send_buffer_size = s;
473
    send_buffer_size = s;
463
    return NULL;
474
    return NULL;
464
}
475
}
476
477
const char *ap_set_receive_buffer_size(cmd_parms *cmd, void *dummy,
478
                                       const char *arg)
479
{
480
    int s = atoi(arg);
481
    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
482
483
    if (err != NULL) {
484
        return err;
485
    }
486
487
    if (s < 512 && s != 0) {
488
        return "ReceiveBufferSize must be >= 512 bytes, or 0 for system default.";
489
    }
490
491
    receive_buffer_size = s;
492
    return NULL;
493
}
(-)httpd-2.0.54/docs/manual/mod/beos.xml.orig (+2 lines)
Lines 43-48 Link Here
43
</directivesynopsis>
43
</directivesynopsis>
44
<directivesynopsis location="mpm_common"><name>ListenBacklog</name>
44
<directivesynopsis location="mpm_common"><name>ListenBacklog</name>
45
</directivesynopsis>
45
</directivesynopsis>
46
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
47
</directivesynopsis>
46
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
48
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
47
</directivesynopsis>
49
</directivesynopsis>
48
<directivesynopsis location="mpm_common"><name>StartThreads</name>
50
<directivesynopsis location="mpm_common"><name>StartThreads</name>
(-)httpd-2.0.54/docs/manual/mod/leader.xml.orig (+2 lines)
Lines 66-71 Link Here
66
</directivesynopsis>
66
</directivesynopsis>
67
<directivesynopsis location="mpm_common"><name>ListenBacklog</name>
67
<directivesynopsis location="mpm_common"><name>ListenBacklog</name>
68
</directivesynopsis>
68
</directivesynopsis>
69
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
70
</directivesynopsis>
69
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
71
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
70
</directivesynopsis>
72
</directivesynopsis>
71
<directivesynopsis location="mpm_common"><name>LockFile</name>
73
<directivesynopsis location="mpm_common"><name>LockFile</name>
(-)httpd-2.0.54/docs/manual/mod/mpm_common.xml.orig (-2 / +22 lines)
Lines 634-639 Link Here
634
</directivesynopsis>
634
</directivesynopsis>
635
635
636
<directivesynopsis>
636
<directivesynopsis>
637
<name>ReceiveBufferSize</name>
638
<description>TCP receive buffer size</description>
639
<syntax>ReceiveBufferSize <var>bytes</var></syntax>
640
<default>ReceiveBufferSize 0</default>
641
<contextlist><context>server config</context></contextlist>
642
<modulelist><module>beos</module><module>leader</module>
643
<module>mpm_netware</module><module>mpm_winnt</module>
644
<module>mpmt_os2</module><module>perchild</module><module>prefork</module>
645
<module>threadpool</module><module>worker</module></modulelist>
646
647
<usage>
648
    <p>The server will set the TCP receive buffer size to the number of
649
    bytes specified.</p>
650
651
    <p>If set to the value of <code>0</code>, the server will use the
652
    OS default.</p>
653
</usage>
654
</directivesynopsis>
655
656
<directivesynopsis>
637
<name>SendBufferSize</name>
657
<name>SendBufferSize</name>
638
<description>TCP buffer size</description>
658
<description>TCP buffer size</description>
639
<syntax>SendBufferSize <var>bytes</var></syntax>
659
<syntax>SendBufferSize <var>bytes</var></syntax>
Lines 645-657 Link Here
645
<module>threadpool</module><module>worker</module></modulelist>
665
<module>threadpool</module><module>worker</module></modulelist>
646
666
647
<usage>
667
<usage>
648
    <p>The server will set the TCP buffer size to the number of bytes
668
    <p>The server will set the TCP send buffer size to the number of bytes
649
    specified. Very useful to increase past standard OS defaults on
669
    specified. Very useful to increase past standard OS defaults on
650
    high speed high latency (<em>i.e.</em>, 100ms or so, such as
670
    high speed high latency (<em>i.e.</em>, 100ms or so, such as
651
    transcontinental fast pipes).</p>
671
    transcontinental fast pipes).</p>
652
672
653
    <p>If set to the value of <code>0</code>, the server will use the
673
    <p>If set to the value of <code>0</code>, the server will use the
654
    OS deault.</p>
674
    OS default.</p>
655
</usage>
675
</usage>
656
</directivesynopsis>
676
</directivesynopsis>
657
677
(-)httpd-2.0.54/docs/manual/mod/mpm_netware.xml.orig (+2 lines)
Lines 73-78 Link Here
73
</directivesynopsis>
73
</directivesynopsis>
74
<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
74
<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
75
</directivesynopsis>
75
</directivesynopsis>
76
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
77
</directivesynopsis>
76
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
78
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
77
</directivesynopsis>
79
</directivesynopsis>
78
<directivesynopsis location="mpm_common"><name>MaxSpareThreads</name>
80
<directivesynopsis location="mpm_common"><name>MaxSpareThreads</name>
(-)httpd-2.0.54/docs/manual/mod/mpmt_os2.xml.orig (+2 lines)
Lines 55-60 Link Here
55
</directivesynopsis>
55
</directivesynopsis>
56
<directivesynopsis location="mpm_common"><name>ListenBacklog</name>
56
<directivesynopsis location="mpm_common"><name>ListenBacklog</name>
57
</directivesynopsis>
57
</directivesynopsis>
58
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
59
</directivesynopsis>
58
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
60
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
59
</directivesynopsis>
61
</directivesynopsis>
60
<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
62
<directivesynopsis location="mpm_common"><name>MaxRequestsPerChild</name>
(-)httpd-2.0.54/docs/manual/mod/mpm_winnt.xml.orig (+2 lines)
Lines 50-55 Link Here
50
</directivesynopsis>
50
</directivesynopsis>
51
<directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
51
<directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
52
</directivesynopsis>
52
</directivesynopsis>
53
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
54
</directivesynopsis>
53
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
55
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
54
</directivesynopsis>
56
</directivesynopsis>
55
<directivesynopsis location="mpm_common"><name>ThreadLimit</name>
57
<directivesynopsis location="mpm_common"><name>ThreadLimit</name>
(-)httpd-2.0.54/docs/manual/mod/perchild.xml.orig (+2 lines)
Lines 170-175 Link Here
170
</directivesynopsis>
170
</directivesynopsis>
171
<directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
171
<directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
172
</directivesynopsis>
172
</directivesynopsis>
173
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
174
</directivesynopsis>
173
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
175
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
174
</directivesynopsis>
176
</directivesynopsis>
175
<directivesynopsis location="mpm_common"><name>ServerLimit</name>
177
<directivesynopsis location="mpm_common"><name>ServerLimit</name>
(-)httpd-2.0.54/docs/manual/mod/prefork.xml.orig (+2 lines)
Lines 107-112 Link Here
107
</directivesynopsis>
107
</directivesynopsis>
108
<directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
108
<directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
109
</directivesynopsis>
109
</directivesynopsis>
110
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
111
</directivesynopsis>
110
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
112
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
111
</directivesynopsis>
113
</directivesynopsis>
112
<directivesynopsis location="mpm_common"><name>ServerLimit</name>
114
<directivesynopsis location="mpm_common"><name>ServerLimit</name>
(-)httpd-2.0.54/docs/manual/mod/threadpool.xml.orig (+2 lines)
Lines 60-65 Link Here
60
</directivesynopsis>
60
</directivesynopsis>
61
<directivesynopsis location="mpm_common"><name>ListenBacklog</name>
61
<directivesynopsis location="mpm_common"><name>ListenBacklog</name>
62
</directivesynopsis>
62
</directivesynopsis>
63
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
64
</directivesynopsis>
63
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
65
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
64
</directivesynopsis>
66
</directivesynopsis>
65
<directivesynopsis location="mpm_common"><name>LockFile</name>
67
<directivesynopsis location="mpm_common"><name>LockFile</name>
(-)httpd-2.0.54/docs/manual/mod/worker.xml.orig (+2 lines)
Lines 167-172 Link Here
167
</directivesynopsis>
167
</directivesynopsis>
168
<directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
168
<directivesynopsis location="mpm_common"><name>ScoreBoardFile</name>
169
</directivesynopsis>
169
</directivesynopsis>
170
<directivesynopsis location="mpm_common"><name>ReceiveBufferSize</name>
171
</directivesynopsis>
170
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
172
<directivesynopsis location="mpm_common"><name>SendBufferSize</name>
171
</directivesynopsis>
173
</directivesynopsis>
172
<directivesynopsis location="mpm_common"><name>ServerLimit</name>
174
<directivesynopsis location="mpm_common"><name>ServerLimit</name>
(-)httpd-2.0.54/docs/manual/vhosts/details.xml.orig (+1 lines)
Lines 191-196 Link Here
191
      <directive module="core">KeepAliveTimeout</directive>,
191
      <directive module="core">KeepAliveTimeout</directive>,
192
      <directive module="core">KeepAlive</directive>,
192
      <directive module="core">KeepAlive</directive>,
193
      <directive module="core">MaxKeepAliveRequests</directive>,
193
      <directive module="core">MaxKeepAliveRequests</directive>,
194
      <directive module="core">ReceiveBufferSize</directive>,
194
      or <directive module="core">SendBufferSize</directive>
195
      or <directive module="core">SendBufferSize</directive>
195
      directive then the respective value is inherited from the
196
      directive then the respective value is inherited from the
196
      main_server. (That is, inherited from whatever the final
197
      main_server. (That is, inherited from whatever the final

Return to bug 36038