Mercurial > hg > nginx-vendor-current
view src/os/unix/ngx_errno.c @ 506:e8b686f230a8 NGINX_0_8_5
nginx 0.8.5
*) Bugfix: now nginx allows underscores in a request method.
*) Bugfix: a 500 error code was returned for invalid login/password
while HTTP Basic authentication on Windows.
*) Bugfix: ngx_http_perl_module responses did not work in subrequests.
*) Bugfix: in ngx_http_limit_req_module.
Thanks to Maxim Dounin.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 13 Jul 2009 00:00:00 +0400 |
parents | 88d3e895bdf9 |
children | 428c6e58046a |
line wrap: on
line source
/* * Copyright (C) Igor Sysoev */ #include <ngx_config.h> #include <ngx_core.h> #if (NGX_HAVE_STRERROR_R) u_char * ngx_strerror_r(int err, u_char *errstr, size_t size) { if (size == 0) { return errstr; } errstr[0] = '\0'; strerror_r(err, (char *) errstr, size); while (*errstr && size) { errstr++; size--; } return errstr; } #elif (NGX_HAVE_GNU_STRERROR_R) /* Linux strerror_r() */ u_char * ngx_strerror_r(int err, u_char *errstr, size_t size) { char *str; if (size == 0) { return errstr; } errstr[0] = '\0'; str = strerror_r(err, (char *) errstr, size); if (str != (char *) errstr) { return ngx_cpystrn(errstr, (u_char *) str, size); } while (*errstr && size) { errstr++; size--; } return errstr; } #endif