comparison src/http/ngx_http_upstream.c @ 336:1c519aff5c0c NGINX_0_6_12

nginx 0.6.12 *) Change: mail proxy was split on three modules: pop3, imap and smtp. *) Feature: the --without-mail_pop3_module, --without-mail_imap_module, and --without-mail_smtp_module configuration parameters. *) Feature: the "smtp_greeting_delay" and "smtp_client_buffer" directives of the ngx_mail_smtp_module. *) Bugfix: the trailing wildcards did not work; bug appeared in 0.6.9. *) Bugfix: nginx could not start on Solaris if the shared PCRE library located in non-standard place was used. *) 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.
author Igor Sysoev <http://sysoev.ru>
date Fri, 21 Sep 2007 00:00:00 +0400
parents 9fc4ab6673f9
children 10cc350ed8a1
comparison
equal deleted inserted replaced
335:9a32ae248b7a 336:1c519aff5c0c
1288 1288
1289 #if (NGX_HAVE_KQUEUE) 1289 #if (NGX_HAVE_KQUEUE)
1290 1290
1291 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { 1291 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
1292 if (c->write->pending_eof) { 1292 if (c->write->pending_eof) {
1293 c->log->action = "connecting to upstream";
1293 (void) ngx_connection_error(c, c->write->kq_errno, 1294 (void) ngx_connection_error(c, c->write->kq_errno,
1294 "kevent() reported that connect() failed"); 1295 "kevent() reported that connect() failed");
1295 return NGX_ERROR; 1296 return NGX_ERROR;
1296 } 1297 }
1297 1298
1311 { 1312 {
1312 err = ngx_errno; 1313 err = ngx_errno;
1313 } 1314 }
1314 1315
1315 if (err) { 1316 if (err) {
1317 c->log->action = "connecting to upstream";
1316 (void) ngx_connection_error(c, err, "connect() failed"); 1318 (void) ngx_connection_error(c, err, "connect() failed");
1317 return NGX_ERROR; 1319 return NGX_ERROR;
1318 } 1320 }
1319 } 1321 }
1320 1322
1487 u->buffer.last = u->buffer.start; 1489 u->buffer.last = u->buffer.start;
1488 1490
1489 if (ngx_http_send_special(r, NGX_HTTP_FLUSH) == NGX_ERROR) { 1491 if (ngx_http_send_special(r, NGX_HTTP_FLUSH) == NGX_ERROR) {
1490 ngx_http_upstream_finalize_request(r, u, 0); 1492 ngx_http_upstream_finalize_request(r, u, 0);
1491 return; 1493 return;
1494 }
1495
1496 if (u->peer.connection->read->ready) {
1497 ngx_http_upstream_process_non_buffered_body(
1498 u->peer.connection->read);
1492 } 1499 }
1493 } 1500 }
1494 1501
1495 return; 1502 return;
1496 } 1503 }
3214 3221
3215 if ((flags & NGX_HTTP_UPSTREAM_CREATE) && uscfp[i]->port) { 3222 if ((flags & NGX_HTTP_UPSTREAM_CREATE) && uscfp[i]->port) {
3216 ngx_log_error(NGX_LOG_WARN, cf->log, 0, 3223 ngx_log_error(NGX_LOG_WARN, cf->log, 0,
3217 "upstream \"%V\" may not have port %d in %s:%ui", 3224 "upstream \"%V\" may not have port %d in %s:%ui",
3218 &u->host, uscfp[i]->port, 3225 &u->host, uscfp[i]->port,
3219 uscfp[i]->file_name.data, uscfp[i]->line); 3226 uscfp[i]->file_name, uscfp[i]->line);
3220 return NULL; 3227 return NULL;
3221 } 3228 }
3222 3229
3223 if (uscfp[i]->port != u->port) { 3230 if (uscfp[i]->port != u->port) {
3224 continue; 3231 continue;
3238 return NULL; 3245 return NULL;
3239 } 3246 }
3240 3247
3241 uscf->flags = flags; 3248 uscf->flags = flags;
3242 uscf->host = u->host; 3249 uscf->host = u->host;
3243 uscf->file_name = cf->conf_file->file.name; 3250 uscf->file_name = cf->conf_file->file.name.data;
3244 uscf->line = cf->conf_file->line; 3251 uscf->line = cf->conf_file->line;
3245 uscf->port = u->port; 3252 uscf->port = u->port;
3246 uscf->default_port = u->default_port; 3253 uscf->default_port = u->default_port;
3247 3254
3248 if (u->naddrs == 1) { 3255 if (u->naddrs == 1) {