comparison src/core/ngx_inet.c @ 212:56688ed172c8 NGINX_0_3_53

nginx 0.3.53 *) Change: the "add_header" directive adds the string to 204, 301, and 302 responses. *) Feature: the "server" directive in the "upstream" context supports the "weight" parameter. *) Feature: the "server_name" directive supports the "*" wildcard. *) Feature: nginx supports the request body size more than 2G. *) Bugfix: if a client was successfully authorized using "satisfy_any on", then anyway the message "access forbidden by rule" was written in the log. *) Bugfix: the "PUT" method may erroneously not create a file and return the 409 code. *) Bugfix: if the IMAP/POP3 backend returned an error, then nginx continued proxying anyway.
author Igor Sysoev <http://sysoev.ru>
date Fri, 07 Jul 2006 00:00:00 +0400
parents d2ae1c9f1fd3
children c982febb7588
comparison
equal deleted inserted replaced
211:f04a54878110 212:56688ed172c8
477 if (peers == NULL) { 477 if (peers == NULL) {
478 return NULL; 478 return NULL;
479 } 479 }
480 480
481 peers->number = i; 481 peers->number = i;
482 peers->weight = 1;
483 482
484 for (i = 0; h->h_addr_list[i] != NULL; i++) { 483 for (i = 0; h->h_addr_list[i] != NULL; i++) {
485 484
486 sin = ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in)); 485 sin = ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in));
487 if (sin == NULL) { 486 if (sin == NULL) {
509 ngx_sprintf(&peers->peer[i].name.data[len], 508 ngx_sprintf(&peers->peer[i].name.data[len],
510 ":%d", port) 509 ":%d", port)
511 - peers->peer[i].name.data; 510 - peers->peer[i].name.data;
512 511
513 peers->peer[i].uri_separator = ""; 512 peers->peer[i].uri_separator = "";
513
514 peers->peer[i].weight = NGX_CONF_UNSET_UINT;
515 peers->peer[i].max_fails = NGX_CONF_UNSET_UINT;
516 peers->peer[i].fail_timeout = NGX_CONF_UNSET;
514 } 517 }
515 518
516 } else { 519 } else {
517 520
518 /* MP: ngx_shared_palloc() */ 521 /* MP: ngx_shared_palloc() */
641 if (peers == NULL) { 644 if (peers == NULL) {
642 return NULL; 645 return NULL;
643 } 646 }
644 647
645 peers->number = i; 648 peers->number = i;
646 peers->weight = 1;
647 649
648 for (i = 0; h->h_addr_list[i] != NULL; i++) { 650 for (i = 0; h->h_addr_list[i] != NULL; i++) {
649 651
650 sin = ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in)); 652 sin = ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in));
651 if (sin == NULL) { 653 if (sin == NULL) {
675 u->port_text.data, u->port_text.len); 677 u->port_text.data, u->port_text.len);
676 678
677 peers->peer[i].name.len = len + u->port_text.len; 679 peers->peer[i].name.len = len + u->port_text.len;
678 680
679 peers->peer[i].uri_separator = ""; 681 peers->peer[i].uri_separator = "";
682
683 peers->peer[i].weight = NGX_CONF_UNSET_UINT;
684 peers->peer[i].max_fails = NGX_CONF_UNSET_UINT;
685 peers->peer[i].fail_timeout = NGX_CONF_UNSET;
680 } 686 }
681 687
682 } else { 688 } else {
683 689
684 /* MP: ngx_shared_palloc() */ 690 /* MP: ngx_shared_palloc() */