comparison src/core/ngx_connection.c @ 584:016632f0fb18 NGINX_0_8_44

nginx 0.8.44 *) Change: now nginx does not cache by default backend responses, if they have a "Set-Cookie" header line. *) Feature: the "listen" directive supports the "setfib" parameter. Thanks to Andrew Filonov. *) Bugfix: the "sub_filter" directive might change character case on partial match. *) Bugfix: compatibility with HP/UX. *) Bugfix: compatibility with AIX xcl_r compiler. *) Bugfix: nginx treated a large SSLv2 packets as plain requests. Thanks to Miroslaw Jaworski.
author Igor Sysoev <http://sysoev.ru>
date Mon, 05 Jul 2010 00:00:00 +0400
parents 7858d4f8dec4
children
comparison
equal deleted inserted replaced
583:39e50617266a 584:016632f0fb18
71 ls->type = SOCK_STREAM; 71 ls->type = SOCK_STREAM;
72 72
73 ls->backlog = NGX_LISTEN_BACKLOG; 73 ls->backlog = NGX_LISTEN_BACKLOG;
74 ls->rcvbuf = -1; 74 ls->rcvbuf = -1;
75 ls->sndbuf = -1; 75 ls->sndbuf = -1;
76
77 #if (NGX_HAVE_SETFIB)
78 ls->setfib = -1;
79 #endif
76 80
77 return ls; 81 return ls;
78 } 82 }
79 83
80 84
177 &ls[i].addr_text); 181 &ls[i].addr_text);
178 182
179 ls[i].sndbuf = -1; 183 ls[i].sndbuf = -1;
180 } 184 }
181 185
186 #if 0
187 /* SO_SETFIB is currently a set only option */
188
189 #if (NGX_HAVE_SETFIB)
190
191 if (getsockopt(ls[i].setfib, SOL_SOCKET, SO_SETFIB,
192 (void *) &ls[i].setfib, &olen)
193 == -1)
194 {
195 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno,
196 "getsockopt(SO_SETFIB) %V failed, ignored",
197 &ls[i].addr_text);
198
199 ls[i].setfib = -1;
200 }
201
202 #endif
203 #endif
204
182 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) 205 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
183 206
184 ngx_memzero(&af, sizeof(struct accept_filter_arg)); 207 ngx_memzero(&af, sizeof(struct accept_filter_arg));
185 olen = sizeof(struct accept_filter_arg); 208 olen = sizeof(struct accept_filter_arg);
186 209
470 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno, 493 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno,
471 "setsockopt(SO_SNDBUF, %d) %V failed, ignored", 494 "setsockopt(SO_SNDBUF, %d) %V failed, ignored",
472 ls[i].sndbuf, &ls[i].addr_text); 495 ls[i].sndbuf, &ls[i].addr_text);
473 } 496 }
474 } 497 }
498
499 #if (NGX_HAVE_SETFIB)
500 if (ls[i].setfib != -1) {
501 if (setsockopt(ls[i].fd, SOL_SOCKET, SO_SETFIB,
502 (const void *) &ls[i].setfib, sizeof(int))
503 == -1)
504 {
505 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_socket_errno,
506 "setsockopt(SO_SETFIB, %d) %V failed, ignored",
507 ls[i].setfib, &ls[i].addr_text);
508 }
509 }
510 #endif
475 511
476 #if 0 512 #if 0
477 if (1) { 513 if (1) {
478 int tcp_nodelay = 1; 514 int tcp_nodelay = 1;
479 515