comparison src/core/ngx_string.c @ 250:fbf2b2f66c9f NGINX_0_4_10

nginx 0.4.10 *) Feature: the POP3 proxy supports the APOP command. *) Bugfix: if the select, poll or /dev/poll methods were used, then while waiting authentication server response the IMAP/POP3 proxy hogged CPU. *) Bugfix: a segmentation fault might occur if the $server_addr variable was used in the "map" directive. *) Bugfix: the ngx_http_flv_module did not support the byte ranges for full responses; bug appeared in 0.4.7. *) Bugfix: nginx could not be built on Debian amd64; bug appeared in 0.4.9.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Oct 2006 00:00:00 +0400
parents 3866d57d9cfd
children f3ec44f4a53b
comparison
equal deleted inserted replaced
249:7a34085272cb 250:fbf2b2f66c9f
591 591
592 592
593 ngx_int_t 593 ngx_int_t
594 ngx_hextoi(u_char *line, size_t n) 594 ngx_hextoi(u_char *line, size_t n)
595 { 595 {
596 u_char ch; 596 u_char c, ch;
597 ngx_int_t value; 597 ngx_int_t value;
598 598
599 if (n == 0) { 599 if (n == 0) {
600 return NGX_ERROR; 600 return NGX_ERROR;
601 } 601 }
606 if (ch >= '0' && ch <= '9') { 606 if (ch >= '0' && ch <= '9') {
607 value = value * 16 + (ch - '0'); 607 value = value * 16 + (ch - '0');
608 continue; 608 continue;
609 } 609 }
610 610
611 if (ch >= 'A' && ch <= 'F') { 611 c = (u_char) (ch | 0x20);
612 value = value * 16 + (ch - 'A' + 10); 612
613 continue; 613 if (c >= 'a' && c <= 'f') {
614 } 614 value = value * 16 + (c - 'a' + 10);
615
616 if (ch >= 'a' && ch <= 'f') {
617 value = value * 16 + (ch - 'a' + 10);
618 continue; 615 continue;
619 } 616 }
620 617
621 return NGX_ERROR; 618 return NGX_ERROR;
622 } 619 }