comparison src/http/ngx_http_request.c @ 460:bb941a2996a6 NGINX_0_7_42

nginx 0.7.42 *) Change: now the "Invalid argument" error returned by setsockopt(TCP_NODELAY) on Solaris, is ignored. *) Change: now if a file specified in a "auth_basic_user_file" directive is absent, then the 405 error is returned instead of the 500 one. *) Feature: the "auth_basic_user_file" directive supports variables. Thanks to Kirill A. Korinskiy. *) Feature: the "listen" directive supports the "ipv6only" parameter. Thanks to Zhang Hua. *) Bugfix: in an "alias" directive with references to captures of regular expressions; the bug had appeared in 0.7.40. *) Bugfix: compatibility with Tru64 UNIX. Thanks to Dustin Marquess. *) Bugfix: nginx could not be built without PCRE library; the bug had appeared in 0.7.41.
author Igor Sysoev <http://sysoev.ru>
date Mon, 16 Mar 2009 00:00:00 +0300
parents 2e2b57743e87
children dcb6b5f9d526
comparison
equal deleted inserted replaced
459:6ef558ffc0eb 460:bb941a2996a6
1609 1609
1610 static ngx_int_t 1610 static ngx_int_t
1611 ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len) 1611 ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len)
1612 { 1612 {
1613 u_char *server; 1613 u_char *server;
1614 size_t ncaptures;
1615 ngx_uint_t hash; 1614 ngx_uint_t hash;
1616 ngx_http_virtual_names_t *vn; 1615 ngx_http_virtual_names_t *vn;
1617 ngx_http_core_loc_conf_t *clcf; 1616 ngx_http_core_loc_conf_t *clcf;
1618 ngx_http_core_srv_conf_t *cscf; 1617 ngx_http_core_srv_conf_t *cscf;
1619 u_char buf[32]; 1618 u_char buf[32];
1644 } 1643 }
1645 1644
1646 #if (NGX_PCRE) 1645 #if (NGX_PCRE)
1647 1646
1648 if (vn->nregex) { 1647 if (vn->nregex) {
1648 size_t ncaptures;
1649 ngx_int_t n; 1649 ngx_int_t n;
1650 ngx_uint_t i; 1650 ngx_uint_t i;
1651 ngx_str_t name; 1651 ngx_str_t name;
1652 ngx_http_server_name_t *sn; 1652 ngx_http_server_name_t *sn;
1653 1653
2419 2419
2420 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY, 2420 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY,
2421 (const void *) &tcp_nodelay, sizeof(int)) 2421 (const void *) &tcp_nodelay, sizeof(int))
2422 == -1) 2422 == -1)
2423 { 2423 {
2424 #if (NGX_SOLARIS)
2425 /* Solaris returns EINVAL if a socket has been shut down */
2426 c->log_error = NGX_ERROR_IGNORE_EINVAL;
2427 #endif
2428
2424 ngx_connection_error(c, ngx_socket_errno, 2429 ngx_connection_error(c, ngx_socket_errno,
2425 "setsockopt(TCP_NODELAY) failed"); 2430 "setsockopt(TCP_NODELAY) failed");
2431
2432 c->log_error = NGX_ERROR_INFO;
2426 ngx_http_close_connection(c); 2433 ngx_http_close_connection(c);
2427 return; 2434 return;
2428 } 2435 }
2429 2436
2430 c->tcp_nodelay = NGX_TCP_NODELAY_SET; 2437 c->tcp_nodelay = NGX_TCP_NODELAY_SET;