Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 569:174f1e853e1e release-0.3.6
nginx-0.3.6-RELEASE import
*) Change: now the IMAP/POP3 proxy do not send the empty login to
authorization server.
*) Feature: the "log_format" supports the variables in the $name form.
*) Bugfix: if at least in one server was no the "listen" directive,
then nginx did not listen on the 80 port; the bug had appeared in
0.3.3.
*) Bugfix: if the URI part is omitted in "proxy_pass" directive, the
the 80 port was always used.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 24 Oct 2005 15:09:41 +0000 |
parents | 9c2f3ed7a247 |
children | 58475592100c |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1172,8 +1172,7 @@ ngx_http_subrequest(ngx_http_request_t * ngx_http_handler(sr); - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "http subrequest \"%V\" done", uri); + /* the request pool may be already destroyed */ return NGX_OK; } @@ -1231,28 +1230,39 @@ ngx_http_internal_redirect(ngx_http_requ } -#if 0 /* STUB: test the delay http handler */ - -ngx_int_t -ngx_http_delay_handler(ngx_http_request_t *r) +ngx_http_cleanup_t * +ngx_http_cleanup_add(ngx_http_request_t *r, size_t size) { - static int on; - - if (on++ == 0) { - ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "http set delay"); - ngx_add_timer(r->connection->write, 10000); - return NGX_AGAIN; + ngx_http_cleanup_t *cln; + + r = r->main; + + cln = ngx_palloc(r->pool, sizeof(ngx_http_cleanup_t)); + if (cln == NULL) { + return NULL; } - r->connection->write->timedout = 0; - ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "http reset delay"); - return NGX_DECLINED; + if (size) { + cln->data = ngx_palloc(r->pool, size); + if (cln->data == NULL) { + return NULL; + } + + } else { + cln->data = NULL; + } + + cln->handler = NULL; + cln->next = r->cleanup; + + r->cleanup = cln; + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "http cleanup add: %p", cln); + + return cln; } -#endif - static char * ngx_http_core_server(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy) @@ -1665,7 +1675,8 @@ ngx_http_core_create_main_conf(ngx_conf_ } if (ngx_array_init(&cmcf->servers, cf->pool, 4, - sizeof(ngx_http_core_srv_conf_t *)) == NGX_ERROR) + sizeof(ngx_http_core_srv_conf_t *)) + == NGX_ERROR) { return NGX_CONF_ERROR; } @@ -1767,6 +1778,10 @@ ngx_http_core_merge_srv_conf(ngx_conf_t ls->port = (getuid() == 0) ? 80 : 8000; #endif ls->family = AF_INET; + + ls->conf.backlog = -1; + ls->conf.rcvbuf = -1; + ls->conf.sndbuf = -1; } if (conf->server_names.nelts == 0) {