summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-06-25Fixed a harmless error in spelling of "Connection: close" when computingRuslan Ermilov1-1/+1
the response header length.
2012-06-21Fixed compile-time conditionals used to detect if X-Forwarded-For supportRuslan Ermilov3-3/+3
is needed.
2012-06-20Disabled gzip compression in OpenSSL prior to 1.0.0 version.Igor Sysoev1-0/+18
This saves about 522K per connection.
2012-06-19Added IPv6 support to ip_hash.Ruslan Ermilov1-16/+27
2012-06-18Upstream keepalive: "single" parameter deprecated.Maxim Dounin1-29/+4
The original idea was to optimize edge cases in case of interchangeable backends, i.e. don't establish a new connection if we have any one cached. This causes more harm than good though, as it screws up underlying balancer's idea about backends used and may result in various unexpected problems.
2012-06-18Fixed return type of ngx_strerror_init().Maxim Dounin4-4/+4
2012-06-18Fixed "sendmsg() failed" alerts on HP-UX.Maxim Dounin1-0/+1
HP-UX needs _HPUX_ALT_XOPEN_SOCKET_API to be defined to be able to use various POSIX versions of networking functions. Notably sendmsg() resulted in "sendmsg() failed (9: Bad file number)" alerts without it. See xopen_networking(7) for more details.
2012-06-18Fixed segfault with poll and resolver used.Maxim Dounin1-0/+4
Poll event method needs ngx_cycle->files to work, and use of ngx_exit_cycle without files set caused null pointer dereference in resolver's cleanup on udp socket close.
2012-06-18Fixed handling of conflicting wildcard server names.Maxim Dounin1-11/+13
With previous code wildcard names were added to hash even if conflict was detected. This resulted in identical names in hash and segfault later in ngx_hash_wildcard_init().
2012-06-18Mp4: fixed streaming if moov atom is at buffer edge.Maxim Dounin1-0/+10
2012-06-18Mp4: fixed non-keyframe seeks in some cases (ticket #175).Maxim Dounin1-1/+8
Number of entries in stsc atom was wrong if we've added an entry to split a chunk. Additionally, there is no need to add an entry if we are going to split last chunk in an entry, it's enough to update the entry we already have. Previously new entry was added and old one was left as is, resulting in incorrect entry with zero chunks which might confuse some software.
2012-06-18Style fix.Andrey Belov1-1/+1
2012-06-18New core variable: $status.Andrey Belov2-4/+40
Contains response status code as a 3-digit integer (with leading zeroes if necessary), or one of the following values: 000 - response status code has not yet been assigned 009 - HTTP/0.9 request is being processed
2012-06-18When "resolver" is configured with a domain name, only the firstRuslan Ermilov1-6/+8
resolved address was used. Now all addresses will be used.
2012-06-18Fixed crash in ngx_resolver_cleanup_tree().Ruslan Ermilov1-4/+3
If sending a DNS request fails with an error (e.g., when mistakenly trying to send it to a local IP broadcast), such a request is not deleted if there are clients waiting on it. However, it was still erroneously removed from the queue. Later ngx_resolver_cleanup_tree() attempted to remove it from the queue again that resulted in a NULL pointer dereference.
2012-06-18Version bump.Ruslan Ermilov2-3/+3
2012-06-08Fixed spelling of "endianness", and called it "byte ordering" in theRuslan Ermilov1-1/+1
user visible part.
2012-06-05Win32: uris with ":$" are now rejected.Maxim Dounin1-6/+22
There are too many problems with special NTFS streams, notably "::$data", "::$index_allocation" and ":$i30:$index_allocation". For now we don't reject all URIs with ":" like Apache does as there are no good reasons seen yet, and there are multiple programs using it in URLs (e.g. MediaWiki).
2012-06-05Win32: normalization of trailing dot inside uri.Maxim Dounin1-0/+20
Windows treats "/directory./" identical to "/directory/". Do the same when working on Windows. Note that the behaviour is different from one with last path component (where multiple spaces and dots are ignored by Windows).
2012-06-05Win32: disallowed access to various non-canonical name variants.Maxim Dounin1-33/+164
This includes trailings dots and spaces, NTFS streams (and short names, as previously checked). The checks are now also done in ngx_file_info(), thus allowing to use the "try_files" directive to protect external scripts.
2012-06-04Support for IPv6 literals and an optional port in resolver.Ruslan Ermilov1-5/+5
2012-06-04Support for IPv6 literals in proxy_pass and so on.Maxim Dounin1-7/+30
2012-06-04Upstream: least_conn compilation fixes.Maxim Dounin1-5/+3
Removed duplicate call of ngx_http_upstream_init_round_robin_peer() overlooked during code changes. Rewritten "return lcp->free_rr_peer(...)" as MSVC doesn't like it.
2012-06-03Upstream: weights support in ip_hash balancer.Maxim Dounin3-3/+33
2012-06-03Upstream: least_conn balancer module.Maxim Dounin1-0/+404
2012-06-03Resolver: fixed format specification.Maxim Dounin1-1/+1
Patch by Yichun Zhang (agentzh).
2012-06-01Code reduction (no functional changes).Ruslan Ermilov1-19/+2
2012-05-30Removed mistaken setting of NGX_SSL_BUFFERED flag in ngx_ssl_send_chain()Valentin Bartenev1-1/+0
if SSL buffer is not used.
2012-05-30Fixed returned value handling from the cookie rewrite handler.Valentin Bartenev1-1/+15
If the "proxy_cookie_domain" or "proxy_cookie_path" directive is used and there are no matches in Set-Cookie header then ngx_http_proxy_rewrite_cookie() returns NGX_DECLINED to indicate that the header was not rewritten. Returning this value further from the upstream headers copy handler resulted in 500 error response. See here for report: http://mailman.nginx.org/pipermail/nginx/2012-May/033858.html
2012-05-29geoip: got rid of ugly casts when calling ngx_free().Ruslan Ermilov1-4/+4
This is done by removing the "const" qualifier from the common return type of handler functions returning either "const char *" or "char *".
2012-05-28Fixed broken build.Ruslan Ermilov1-2/+2
2012-05-28Fixed memory leak if $geoip_org variable was used.Ruslan Ermilov1-2/+13
Patch by Denis F. Latypoff (slightly modified).
2012-05-24Fixed the reuse of parsed DTDs and XSLTs.Ruslan Ermilov1-2/+2
Patch by Kuramoto Eiji.
2012-05-23Fixed compilation with -DNGX_DEBUG_MALLOC on FreeBSD 10.Maxim Dounin1-2/+2
After jemalloc 3.0.0 import there is no _malloc_options symbol, it has been replaced with the malloc_conf one with a different syntax.
2012-05-23Fixed warning during nginx.xs compilation.Maxim Dounin1-1/+1
2012-05-22Fixed potential null pointer dereference in ngx_resolver_create().Ruslan Ermilov1-1/+6
While here, improved error message.
2012-05-21Removed historical and now redundant syntax pre-checks in ngx_parse_url().Ruslan Ermilov1-5/+0
2012-05-17Fixed core variables dynamic access after reconfiguration.Maxim Dounin1-2/+9
If variable was indexed in previous configuration but not in current one, the NGX_HTTP_VAR_INDEXED flag was left set and confused ngx_http_get_variable(). Patch by Yichun Zhang (agentzh), slightly modified.
2012-05-17Fixed segfault with filter_finalize introduced in r4621 (1.3.0).Maxim Dounin1-2/+0
Example configuration to reproduce: location /image/ { error_page 415 = /zero; image_filter crop 100 100; proxy_pass http://127.0.0.1:8080; proxy_store on; } location /zero { return 204; } The problem appeared if upstream returned (big enough) non-image file, causing 415 to be generated by image filter.
2012-05-17Fixed the ngx_regex.h header file compatibility with C++.Valentin Bartenev2-5/+5
2012-05-16Zero padded the returned and logged HTTP status code, and fixed possibleRuslan Ermilov2-3/+3
buffer overrun in $status handling.
2012-05-16Capped the status code that may be returned with "return" and "try_files".Ruslan Ermilov2-1/+7
2012-05-16Added syntax checking of the second parameter of the "split_clients" directive.Ruslan Ermilov1-0/+7
2012-05-16Version bump.Ruslan Ermilov2-3/+3
2012-05-15Fixed win32 build after changes in r4624.Ruslan Ermilov1-5/+5
2012-05-14Update c->sent in ngx_ssl_send_chain() even if SSL buffer is not used.Valentin Bartenev1-0/+1
2012-05-14Reverted previous attempt to fix complation warning introduced inRuslan Ermilov1-13/+12
r4624 and actually fixed it.
2012-05-14geoip: trusted proxies support and partial IPv6 support.Ruslan Ermilov1-30/+130
The module now supports recursive search of client address through the chain of trusted proxies (closes #100), in the same scope as the geo module. Proxies are listed by the "geoip_proxy" directive, recursive search is enabled by the "geoip_proxy_recursive" directive. IPv6 is partially supported: proxies may be specified with IPv6 addresses. Example: geoip_country .../GeoIP.dat; geoip_proxy 127.0.0.1; geoip_proxy ::1; geoip_proxy 10.0.0.0/8; geoip_proxy_recursive on;
2012-05-14geo: chains of trusted proxies and partial IPv6 support.Ruslan Ermilov1-74/+62
The module now supports recursive search of client address through the chain of trusted proxies, controlled by the "proxy_recursive" directive in the "geo" block. It also gets partial IPv6 support: now proxies may be specified with IPv6 addresses. Example: geo $test { ... proxy 127.0.0.1; proxy ::1; proxy_recursive; } There's also a slight change in behavior. When original client address (as specified by the "geo" directive) is one of the trusted proxies, and the value of the X-Forwarded-For request header cannot not be parsed as a valid address, an original client address will be used for lookup. Previously, 255.255.255.255 was used in this case.
2012-05-14Fixed compilation warning introduced in r4624.Ruslan Ermilov1-5/+13