aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_string.h
Commit message (Collapse)AuthorAge
* Removed casts from ngx_memcmp() macro.Maxim Dounin2022-11-30
| | | | | | | | | | | | | | Casts are believed to be not needed, since memcmp() has "const void *" arguments since introduction of the "void" type in C89. And on pre-C89 platforms nginx is unlikely to compile without warnings anyway, as there are no casts in memcpy() and memmove() calls. These casts were added in 1648:89a47f19b9ec without any details on why they were added, and Igor does not remember details either. The most plausible explanation is that they were copied from ngx_strcmp() and were not really needed even at that time. Prodded by Alejandro Colomar.
* Fixed alignment of ngx_memmove()/ngx_movemem() macro definitions.Maxim Dounin2022-11-30
|
* Core: ngx_explicit_memzero().Maxim Dounin2018-11-15
|
* Fixed handling of non-null-terminated unix sockets.Maxim Dounin2017-10-04
| | | | | | | | | | | | | At least FreeBSD, macOS, NetBSD, and OpenBSD can return unix sockets with non-null-terminated sun_path. Additionally, the address may become non-null-terminated if it does not fit into the buffer provided and was truncated (may happen on macOS, NetBSD, and Solaris, which allow unix socket addresess larger than struct sockaddr_un). As such, ngx_sock_ntop() might overread the sockaddr provided, as it used "%s" format and thus assumed null-terminated string. To fix this, the ngx_strnlen() function was introduced, and it is now used to calculate correct length of sun_path.
* Autoindex: implemented JSON output format.Valentin Bartenev2014-12-12
|
* Core: added ngx_encode_base64url().Maxim Dounin2014-02-04
|
* Added ngx_filename_cmp() with "/" sorted to the left.Maxim Dounin2013-09-23
| | | | | | | | | | | | | | | | | | | | | | This patch fixes incorrect handling of auto redirect in configurations like: location /0 { } location /a- { } location /a/ { proxy_pass ... } With previously used sorting, this resulted in the following locations tree (as "-" is less than "/"): "/a-" "/0" "/a/" and a request to "/a" didn't match "/a/" with auto_redirect, as it didn't traverse relevant tree node during lookup (it tested "/a-", then "/0", and then falled back to null location). To preserve locale use for non-ASCII characters on case-insensetive systems, libc's tolower() used.
* Added "const" to ngx_memcpy() with NGX_MEMCPY_LIMIT defined.Maxim Dounin2012-08-03
| | | | | This fixes warning produced during compilation of the ngx_http_geoip_module due to const qualifier being discarded.
* Copyright updated.Maxim Konovalov2012-01-18
|
* Autoindex: escape '?' in file names.Maxim Dounin2011-10-11
| | | | | | | | | | | | | | | | For files with '?' in their names autoindex generated links with '?' not escaped. This resulted in effectively truncated links as '?' indicates query string start. This is an updated version of the patch originally posted at [1]. It introduces generic NGX_ESCAPE_URI_COMPONENT which escapes everything but unreserved characters as per RFC 3986. This approach also renders unneeded special colon processing (as colon is percent-encoded now), it's dropped accordingly. [1] http://nginx.org/pipermail/nginx-devel/2010-February/000112.html Reported by Konstantin Leonov.
* use memmove() in appropriate placesIgor Sysoev2011-04-12
|
* new ngx_http_secure_link_module with secure_link, secure_link_md5, andIgor Sysoev2010-09-02
| | | | secure_link_expires
* fix a bug when ngx_cpymem() returns a cast type:Igor Sysoev2010-06-24
| | | | p = (type *) ngx_cpymem(...)
* change ngx_http_variable_value_node_t to more generic ngx_str_node_tIgor Sysoev2010-06-23
|
* ngx_str_set() and ngx_str_null()Igor Sysoev2010-05-14
|
* ngx_atofp()Igor Sysoev2010-05-14
|
* If .domain.com, .sub.domain.com, and .domain-some.com were defined,Igor Sysoev2009-09-12
| | | | | | | | | | then .sub.domain.com was matched by .domain.com: wildcard names hash was built incorrectly due to sorting order issue of "." vs "-". They were sorted as com.domain com.domain-some com.domain.sub while they should be sorted as com.domain com.domain.sub com.domain-some for correct hash building
* ngx_vslprintf(), ngx_slprintf()Igor Sysoev2009-04-27
|
* ngx_strlcasestrn()Igor Sysoev2009-04-04
|
* ngx_strlchr()Igor Sysoev2008-08-26
|
* ngx_strlow()Igor Sysoev2008-08-04
|
* rename ngx_utf_...() to ngx_utf8_...()Igor Sysoev2008-07-29
|
* fix utf-8 names in autoindexIgor Sysoev2008-07-25
|
* escape 0x00-0x1f, ", and \ in access log variablesIgor Sysoev2008-05-15
|
* use ngx_int_t in ngx_sort() callbackIgor Sysoev2008-03-24
|
* replace ngx_md5_text() with ngx_hex_dump()Igor Sysoev2007-12-17
|
* update ngx_memcmp()Igor Sysoev2007-11-23
|
* unescape SSI includeIgor Sysoev2007-10-22
|
* fix English grammarIgor Sysoev2007-10-14
|
* ngx_strnstr()Igor Sysoev2007-10-01
|
* ngx_escape_html()Igor Sysoev2007-09-27
|
* ngx_strstrn() and ngx_strcasestrn()Igor Sysoev2007-09-26
|
* escape " ", "%", and %00-%1F in login and passwordIgor Sysoev2007-08-20
|
* escape space, etc in $memcached_keyIgor Sysoev2007-07-22
|
* Sun Studio on sparc uses different bit orderIgor Sysoev2007-07-17
|
* msie_refresh should escape at least '"' to prevent XSSIgor Sysoev2007-07-13
|
* ngx_sortIgor Sysoev2007-05-21
|
* style fixIgor Sysoev2007-05-19
|
* *) introduce ngx_strchr()Igor Sysoev2007-04-02
| | | | | *) test server_name for '/': it's common configuration error when trailing ';' is omitted and a next directive is treated as server_name
* ngx_strcasecmp()/ngx_strncasecmp()Igor Sysoev2007-02-14
|
* ngx_strn2cmp() > ngx_memn2cmp()Igor Sysoev2007-01-12
|
* ngx_strn2cmp()Igor Sysoev2007-01-12
|
* nginx-0.3.50-RELEASE importrelease-0.3.50Igor Sysoev2006-06-28
| | | | | | | | | | | | | | | | | | | | | *) Change: the "proxy_redirect_errors" and "fastcgi_redirect_errors" directives was renamed to the "proxy_intercept_errors" and "fastcgi_intercept_errors" directives. *) Feature: the ngx_http_charset_module supports the recoding from the single byte encodings to the UTF-8 encoding and back. *) Feature: the "X-Accel-Charset" response header line is supported in proxy and FastCGI mode. *) Bugfix: the "\" escape symbol in the "\"" and "\'" pairs in the SSI command was removed only if the command also has the "$" symbol. *) Bugfix: the "<!--" string might be added on some conditions in the SSI after inclusion. *) Bugfix: if the "Content-Length: 0" header line was in response, then in nonbuffered proxying mode the client connection was not closed.
* nginx-0.3.46-RELEASE importrelease-0.3.46Igor Sysoev2006-05-11
| | | | | | | | | | | | | | *) Feature: the "proxy_hide_header", "proxy_pass_header", "fastcgi_hide_header", and "fastcgi_pass_header" directives. *) Change: the "proxy_pass_x_powered_by", "fastcgi_x_powered_by", and "proxy_pass_server" directives were canceled. *) Feature: the "X-Accel-Buffering" response header line is supported in proxy mode. *) Bugfix: the reconfiguration bug and memory leaks in the ngx_http_perl_module.
* nginx-0.3.22-RELEASE importrelease-0.3.22Igor Sysoev2006-01-17
| | | | | | | | | | | | *) Feature: the ngx_http_perl_module supports the $r->args and $r->unescape methods. *) Feature: the method $r->query_string of ngx_http_perl_module was canceled. *) Bugfix: segmentation fault was occurred if the "none" or "blocked" values was specified in the "valid_referers" directive; the bug had appeared in 0.3.18.
* nginx-0.3.13-RELEASE importrelease-0.3.13Igor Sysoev2005-12-05
| | | | | | | | | | | | | | | *) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS. *) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and /dev/poll methods. *) Bugfix: in SSI handling. *) Bugfix: now Solaris sendfilev() is not used to transfer the client request body to FastCGI-server via the unix domain socket. *) Bugfix: the "auth_basic" directive did not disable the authorization; the bug had appeared in 0.3.11.
* nginx-0.3.10-RELEASE importrelease-0.3.10Igor Sysoev2005-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *) Change: the "valid_referers" directive and the "$invalid_referer" variable were moved to the new ngx_http_referer_module from the ngx_http_rewrite_module. *) Change: the "$apache_bytes_sent" variable name was changed to "$body_bytes_sent". *) Feature: the "$sent_http_..." variables. *) Feature: the "if" directive supports the "=" and "!=" operations. *) Feature: the "proxy_pass" directive supports the HTTPS protocol. *) Feature: the "proxy_set_body" directive. *) Feature: the "post_action" directive. *) Feature: the ngx_http_empty_gif_module. *) Feature: the "worker_cpu_affinity" directive for Linux. *) Bugfix: the "rewrite" directive did not unescape URI part in redirect, now it is unescaped except the %00-%25 and %7F-%FF characters. *) Bugfix: nginx could not be built by the icc 9.0 compiler. *) Bugfix: if the SSI was enabled for zero size static file, then the chunked response was encoded incorrectly.
* nginx-0.3.8-RELEASE importrelease-0.3.8Igor Sysoev2005-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *) Security: nginx now checks URI got from a backend in "X-Accel-Redirect" header line or in SSI file for the "/../" paths and zeroes. *) Change: nginx now does not treat the empty user name in the "Authorization" header line as valid one. *) Feature: the "ssl_session_timeout" directives of the ngx_http_ssl_module and ngx_imap_ssl_module. *) Feature: the "auth_http_header" directive of the ngx_imap_auth_http_module. *) Feature: the "add_header" directive. *) Feature: the ngx_http_realip_module. *) Feature: the new variables to use in the "log_format" directive: $bytes_sent, $apache_bytes_sent, $status, $time_gmt, $uri, $request_time, $request_length, $upstream_status, $upstream_response_time, $gzip_ratio, $uid_got, $uid_set, $connection, $pipe, and $msec. The parameters in the "%name" form will be canceled soon. *) Change: now the false variable values in the "if" directive are the empty string "" and string starting with "0". *) Bugfix: while using proxied or FastCGI-server nginx may leave connections and temporary files with client requests in open state. *) Bugfix: the worker processes did not flush the buffered logs on graceful exit. *) Bugfix: if the request URI was changes by the "rewrite" directive and the request was proxied in location given by regular expression, then the incorrect request was transferred to backend; the bug had appeared in 0.2.6. *) Bugfix: the "expires" directive did not remove the previous "Expires" header. *) Bugfix: nginx may stop to accept requests if the "rtsig" method and several worker processes were used. *) Bugfix: the "\"" and "\'" escape symbols were incorrectly handled in SSI commands. *) Bugfix: if the response was ended just after the SSI command and gzipping was used, then the response did not transferred complete or did not transferred at all.
* nginx-0.1.38-RELEASE importrelease-0.1.38Igor Sysoev2005-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *) Feature: the "limit_rate" directive is supported in in proxy and FastCGI mode. *) Feature: the "X-Accel-Limit-Rate" response header line is supported in proxy and FastCGI mode. *) Feature: the "break" directive. *) Feature: the "log_not_found" directive. *) Bugfix: the response status code was not changed when request was redirected by the ""X-Accel-Redirect" header line. *) Bugfix: the variables set by the "set" directive could not be used in SSI. *) Bugfix: the segmentation fault may occurred if the SSI page has more than one remote subrequest. *) Bugfix: nginx treated the backend response as invalid if the status line in the header was transferred in two packets; the bug had appeared in 0.1.29. *) Feature: the "ssi_types" directive. *) Feature: the "autoindex_exact_size" directive. *) Bugfix: the ngx_http_autoindex_module did not support the long file names in UTF-8. *) Feature: the IMAP/POP3 proxy.
* nginx-0.1.36-RELEASE importrelease-0.1.36Igor Sysoev2005-06-15
| | | | | | | | | | | | | | | | | | | | | *) Change: if the request header has duplicate the "Host", "Connection", "Content-Length", or "Authorization" lines, then nginx now returns the 400 error. *) Change: the "post_accept_timeout" directive was canceled. *) Feature: the "default", "af=", "bl=", "deferred", and "bind" parameters of the "listen" directive. *) Feature: the FreeBSD accept filters support. *) Feature: the Linux TCP_DEFER_ACCEPT support. *) Bugfix: the ngx_http_autoindex_module did not support the file names in UTF-8. *) Bugfix: the new log file can be rotated by the -USR1 signal only if the reconfiguration by the -HUP signal was made twice.