Mercurial > hg > nginx-vendor-0-8
comparison src/core/ngx_inet.c @ 118:644a7935144b NGINX_0_3_6
nginx 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; bug 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 <http://sysoev.ru> |
---|---|
date | Mon, 24 Oct 2005 00:00:00 +0400 |
parents | dad2fe8ecf08 |
children | df17fbafec8f |
comparison
equal
deleted
inserted
replaced
117:0821ea4ccfc5 | 118:644a7935144b |
---|---|
450 | 450 |
451 break; | 451 break; |
452 } | 452 } |
453 } | 453 } |
454 | 454 |
455 if (u->port_text.data == NULL) { | 455 if (u->port_text.data) { |
456 | |
457 if (u->port_text.len == 0) { | |
458 u->port_text.len = &url->data[i] - u->port_text.data; | |
459 | |
460 if (u->port_text.len == 0) { | |
461 return "invalid port"; | |
462 } | |
463 } | |
464 | |
465 port = ngx_atoi(u->port_text.data, u->port_text.len); | |
466 | |
467 if (port == NGX_ERROR || port < 1 || port > 65536) { | |
468 return "invalid port"; | |
469 } | |
470 | |
471 } else { | |
456 port = ngx_atoi(url->data, url->len); | 472 port = ngx_atoi(url->data, url->len); |
457 | 473 |
458 if (port == NGX_ERROR) { | 474 if (port == NGX_ERROR) { |
459 u->default_port = 1; | 475 u->default_port = 1; |
460 u->host.len = url->len; | 476 u->host.len = url->len; |
462 return NULL; | 478 return NULL; |
463 } | 479 } |
464 | 480 |
465 u->port_text = *url; | 481 u->port_text = *url; |
466 u->wildcard = 1; | 482 u->wildcard = 1; |
467 | |
468 } else { | |
469 if (u->port_text.len == 0) { | |
470 u->default_port = 1; | |
471 return NULL; | |
472 } | |
473 | |
474 port = ngx_atoi(u->port_text.data, u->port_text.len); | |
475 | |
476 if (port == NGX_ERROR || port < 1 || port > 65536) { | |
477 return "invalid port"; | |
478 } | |
479 } | 483 } |
480 | 484 |
481 u->port = (in_port_t) port; | 485 u->port = (in_port_t) port; |
482 | 486 |
483 return NULL; | 487 return NULL; |