diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2005-10-24 15:09:41 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2005-10-24 15:09:41 +0000 |
| commit | 9ac946bcc9f8f3735af8eb253c1e89f177db5827 (patch) | |
| tree | 0d42898bfbe5931131d4544699b18c9d697d2cef /src/http/ngx_http_core_module.c | |
| parent | 51d8bcc28b729a8a3056a0c98e2c44e466351141 (diff) | |
| download | nginx-release-0.3.6.tar.gz nginx-release-0.3.6.tar.bz2 | |
nginx-0.3.6-RELEASE importrelease-0.3.6
*) 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.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 21224d389..a12a1344d 100644 --- 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 *r, 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,27 +1230,38 @@ ngx_http_internal_redirect(ngx_http_request_t *r, } -#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; + ngx_http_cleanup_t *cln; - 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; + 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; + } -#endif + } 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; +} static char * @@ -1665,7 +1675,8 @@ ngx_http_core_create_main_conf(ngx_conf_t *cf) } 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 *cf, void *parent, void *child) 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) { |
