Mercurial > hg > nginx-vendor-0-5
comparison src/http/ngx_http_upstream.c @ 324:7cf404023f50 NGINX_0_5_32
nginx 0.5.32
*) Change: now nginx tries to set the "worker_priority",
"worker_rlimit_nofile", "worker_rlimit_core", and
"worker_rlimit_sigpending" without super-user privileges.
*) Change: now nginx escapes space and "%" in request to a mail proxy
authentication server.
*) Change: now nginx escapes "%" in $memcached_key variable.
*) Change: the special make target "upgrade1" was defined for online
upgrade of 0.1.x versions.
*) Feature: the "add_header Last-Modified ..." directive changes the
"Last-Modified" response header line.
*) Feature: the mail proxy supports AUTHENTICATE in IMAP mode.
Thanks to Maxim Dounin.
*) Feature: the mail proxy supports STARTTLS in SMTP mode.
Thanks to Maxim Dounin.
*) Bugfix: nginx did not close directory file on HEAD request if
autoindex was used.
Thanks to Arkadiusz Patyk.
*) Bugfix: the "proxy_hide_header" and "fastcgi_hide_header" directives
did not hide response header lines whose name was longer than 32
characters.
Thanks to Manlio Perillo.
*) Bugfix: active connection counter always increased if mail proxy was
used.
*) Bugfix: if backend returned response header only using non-buffered
proxy, then nginx closed backend connection on timeout.
*) Bugfix: nginx did not support several "Connection" request header
lines.
*) Bugfix: a charset set by the "charset" directive was not appended to
the "Content-Type" header set by $r->send_http_header().
*) Bugfix: a segmentation fault might occur in worker process if
/dev/poll method was used.
*) Bugfix: nginx did not work on FreeBSD/sparc64.
*) Bugfix: a segmentation fault occurred in worker process if invalid
address was set in the "auth_http" directive.
*) Bugfix: now nginx uses default listen backlog value 511 on all
platforms except FreeBSD.
Thanks to Jiang Hong.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
*) Bugfix: if the same host without specified port was used as backend
for HTTP and HTTPS, then nginx used only one port - 80 or 443.
*) Bugfix: the "proxy_ignore_client_abort" and
"fastcgi_ignore_client_abort" directives did not work; bug appeared
in 0.5.13.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 24 Sep 2007 00:00:00 +0400 |
parents | 56675f002600 |
children | f70f2f565fe0 |
comparison
equal
deleted
inserted
replaced
323:85aeb2da6e4c | 324:7cf404023f50 |
---|---|
579 c->data = r; | 579 c->data = r; |
580 | 580 |
581 c->write->handler = ngx_http_upstream_send_request_handler; | 581 c->write->handler = ngx_http_upstream_send_request_handler; |
582 c->read->handler = ngx_http_upstream_process_header; | 582 c->read->handler = ngx_http_upstream_process_header; |
583 | 583 |
584 c->sendfile = r->connection->sendfile; | 584 c->sendfile &= r->connection->sendfile; |
585 | 585 |
586 c->pool = r->pool; | 586 c->pool = r->pool; |
587 c->read->log = c->write->log = c->log = r->connection->log; | 587 c->read->log = c->write->log = c->log = r->connection->log; |
588 | 588 |
589 /* init or reinit the ngx_output_chain() and ngx_chain_writer() contexts */ | 589 /* init or reinit the ngx_output_chain() and ngx_chain_writer() contexts */ |
1286 | 1286 |
1287 #if (NGX_HAVE_KQUEUE) | 1287 #if (NGX_HAVE_KQUEUE) |
1288 | 1288 |
1289 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { | 1289 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { |
1290 if (c->write->pending_eof) { | 1290 if (c->write->pending_eof) { |
1291 c->log->action = "connecting to upstream"; | |
1291 (void) ngx_connection_error(c, c->write->kq_errno, | 1292 (void) ngx_connection_error(c, c->write->kq_errno, |
1292 "kevent() reported that connect() failed"); | 1293 "kevent() reported that connect() failed"); |
1293 return NGX_ERROR; | 1294 return NGX_ERROR; |
1294 } | 1295 } |
1295 | 1296 |
1309 { | 1310 { |
1310 err = ngx_errno; | 1311 err = ngx_errno; |
1311 } | 1312 } |
1312 | 1313 |
1313 if (err) { | 1314 if (err) { |
1315 c->log->action = "connecting to upstream"; | |
1314 (void) ngx_connection_error(c, err, "connect() failed"); | 1316 (void) ngx_connection_error(c, err, "connect() failed"); |
1315 return NGX_ERROR; | 1317 return NGX_ERROR; |
1316 } | 1318 } |
1317 } | 1319 } |
1318 | 1320 |
1485 u->buffer.last = u->buffer.start; | 1487 u->buffer.last = u->buffer.start; |
1486 | 1488 |
1487 if (ngx_http_send_special(r, NGX_HTTP_FLUSH) == NGX_ERROR) { | 1489 if (ngx_http_send_special(r, NGX_HTTP_FLUSH) == NGX_ERROR) { |
1488 ngx_http_upstream_finalize_request(r, u, 0); | 1490 ngx_http_upstream_finalize_request(r, u, 0); |
1489 return; | 1491 return; |
1492 } | |
1493 | |
1494 if (u->peer.connection->read->ready) { | |
1495 ngx_http_upstream_process_non_buffered_body( | |
1496 u->peer.connection->read); | |
1490 } | 1497 } |
1491 } | 1498 } |
1492 | 1499 |
1493 return; | 1500 return; |
1494 } | 1501 } |
3199 | 3206 |
3200 if ((flags & NGX_HTTP_UPSTREAM_CREATE) && uscfp[i]->port) { | 3207 if ((flags & NGX_HTTP_UPSTREAM_CREATE) && uscfp[i]->port) { |
3201 ngx_log_error(NGX_LOG_WARN, cf->log, 0, | 3208 ngx_log_error(NGX_LOG_WARN, cf->log, 0, |
3202 "upstream \"%V\" may not have port %d in %s:%ui", | 3209 "upstream \"%V\" may not have port %d in %s:%ui", |
3203 &u->host, uscfp[i]->port, | 3210 &u->host, uscfp[i]->port, |
3204 uscfp[i]->file_name.data, uscfp[i]->line); | 3211 uscfp[i]->file_name, uscfp[i]->line); |
3205 return NULL; | 3212 return NULL; |
3206 } | 3213 } |
3207 | 3214 |
3208 if (uscfp[i]->port != u->port) { | 3215 if (uscfp[i]->port != u->port) { |
3216 continue; | |
3217 } | |
3218 | |
3219 if (uscfp[i]->default_port && u->default_port | |
3220 && uscfp[i]->default_port != u->default_port) | |
3221 { | |
3209 continue; | 3222 continue; |
3210 } | 3223 } |
3211 | 3224 |
3212 return uscfp[i]; | 3225 return uscfp[i]; |
3213 } | 3226 } |
3217 return NULL; | 3230 return NULL; |
3218 } | 3231 } |
3219 | 3232 |
3220 uscf->flags = flags; | 3233 uscf->flags = flags; |
3221 uscf->host = u->host; | 3234 uscf->host = u->host; |
3222 uscf->file_name = cf->conf_file->file.name; | 3235 uscf->file_name = cf->conf_file->file.name.data; |
3223 uscf->line = cf->conf_file->line; | 3236 uscf->line = cf->conf_file->line; |
3224 uscf->port = u->port; | 3237 uscf->port = u->port; |
3225 uscf->default_port = u->default_port; | 3238 uscf->default_port = u->default_port; |
3226 | 3239 |
3227 if (u->naddrs == 1) { | 3240 if (u->naddrs == 1) { |