comparison src/core/ngx_parse.c @ 112:408f195b3482 NGINX_0_3_3

nginx 0.3.3 *) Change: the "bl" and "af" parameters of the "listen" directive was renamed to the "backlog" and "accept_filter". *) Feature: the "rcvbuf" and "sndbuf" parameters of the "listen" directive. *) Change: the "$msec" log parameter does not require now the additional the gettimeofday() system call. *) Feature: the -t switch now tests the "listen" directives. *) Bugfix: if the invalid address was specified in the "listen" directive, then after the -HUP signal nginx left an open socket in the CLOSED state. *) Bugfix: the mime type may be incorrectly set to default value for index file with variable in the name; bug appeared in 0.3.0. *) Feature: the "timer_resolution" directive. *) Feature: the millisecond "$upstream_response_time" log parameter. *) Bugfix: a temporary file with client request body now is removed just after the response header was transferred to a client. *) Bugfix: OpenSSL 0.9.6 compatibility. *) Bugfix: the SSL certificate and key file paths could not be relative. *) Bugfix: the "ssl_prefer_server_ciphers" directive did not work in the ngx_imap_ssl_module. *) Bugfix: the "ssl_protocols" directive allowed to specify the single protocol only.
author Igor Sysoev <http://sysoev.ru>
date Wed, 19 Oct 2005 00:00:00 +0400
parents f0b350454894
children d2ae1c9f1fd3
comparison
equal deleted inserted replaced
111:a175b609c76d 112:408f195b3482
6 6
7 #include <ngx_config.h> 7 #include <ngx_config.h>
8 #include <ngx_core.h> 8 #include <ngx_core.h>
9 9
10 10
11 ngx_int_t ngx_parse_size(ngx_str_t *line) 11 ssize_t
12 ngx_parse_size(ngx_str_t *line)
12 { 13 {
13 u_char last; 14 u_char last;
14 size_t len; 15 size_t len;
15 ngx_int_t scale, size; 16 ssize_t size;
17 ngx_int_t scale;
16 18
17 len = line->len; 19 len = line->len;
18 last = line->data[len - 1]; 20 last = line->data[len - 1];
19 21
20 switch (last) { 22 switch (last) {
32 34
33 default: 35 default:
34 scale = 1; 36 scale = 1;
35 } 37 }
36 38
37 size = ngx_atoi(line->data, len); 39 size = ngx_atosz(line->data, len);
38 if (size == NGX_ERROR) { 40 if (size == NGX_ERROR) {
39 return NGX_ERROR; 41 return NGX_ERROR;
40 } 42 }
41 43
42 size *= scale; 44 size *= scale;
43 45
44 return size; 46 return size;
45 } 47 }
46 48
47 49
48 ngx_int_t ngx_parse_time(ngx_str_t *line, ngx_int_t sec) 50 ngx_int_t
51 ngx_parse_time(ngx_str_t *line, ngx_int_t sec)
49 { 52 {
50 size_t len; 53 size_t len;
51 u_char *start, last; 54 u_char *start, last;
52 ngx_int_t value, total, scale; 55 ngx_int_t value, total, scale;
53 ngx_uint_t max, i; 56 ngx_uint_t max, i;