Mercurial > hg > nginx-vendor-current
annotate src/os/unix/ngx_errno.c @ 412:b246022ef454 NGINX_0_7_18
nginx 0.7.18
*) Change: the "underscores_in_headers" directive; now nginx does not
allows underscores in a client request header line names.
*) Feature: the ngx_http_secure_link_module.
*) Feature: the "real_ip_header" directive supports any header.
*) Feature: the "log_subrequest" directive.
*) Feature: the $realpath_root variable.
*) Feature: the "http_502" and "http_504" parameters of the
"proxy_next_upstream" directive.
*) Bugfix: the "http_503" parameter of the "proxy_next_upstream" or
"fastcgi_next_upstream" directives did not work.
*) Bugfix: nginx might send a "Transfer-Encoding: chunked" heaer line
for HEAD requests.
*) Bugfix: now accept threshold depends on worker_connections.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 13 Oct 2008 00:00:00 +0400 |
parents | 72eb30262aac |
children | 88d3e895bdf9 |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #include <ngx_config.h> | |
8 #include <ngx_core.h> | |
9 | |
10 | |
18 | 11 #if (NGX_HAVE_STRERROR_R) |
0 | 12 |
10 | 13 u_char *ngx_strerror_r(int err, u_char *errstr, size_t size) |
0 | 14 { |
15 if (size == 0) { | |
16 return 0; | |
17 } | |
18 | |
19 errstr[0] = '\0'; | |
20 | |
10 | 21 strerror_r(err, (char *) errstr, size); |
0 | 22 |
10 | 23 while (*errstr && size) { |
24 errstr++; | |
25 size--; | |
0 | 26 } |
27 | |
10 | 28 return errstr; |
0 | 29 } |
30 | |
18 | 31 #elif (NGX_HAVE_GNU_STRERROR_R) |
0 | 32 |
33 /* Linux strerror_r() */ | |
34 | |
10 | 35 u_char *ngx_strerror_r(int err, u_char *errstr, size_t size) |
0 | 36 { |
50 | 37 char *str; |
0 | 38 |
39 if (size == 0) { | |
40 return 0; | |
41 } | |
42 | |
43 errstr[0] = '\0'; | |
44 | |
10 | 45 str = strerror_r(err, (char *) errstr, size); |
0 | 46 |
10 | 47 if (str != (char *) errstr) { |
48 return ngx_cpystrn(errstr, (u_char *) str, size); | |
0 | 49 } |
50 | |
10 | 51 while (*errstr && size) { |
52 errstr++; | |
53 size--; | |
0 | 54 } |
55 | |
10 | 56 return errstr; |
0 | 57 } |
58 | |
59 #endif |