Commit graph

4327 commits

Author SHA1 Message Date
Ruslan Ermilov
6efae9d41f map: strip final dot before looking up in a map of hostnames.
(closes #182)
2012-06-29 20:33:26 +00:00
Ruslan Ermilov
cd9e54d0b8 Version bump. 2012-06-29 11:03:01 +00:00
Maxim Dounin
4ac240ab86 release-1.3.2 tag 2012-06-26 13:46:53 +00:00
Maxim Dounin
6bdf179115 nginx-1.3.2-RELEASE 2012-06-26 13:46:23 +00:00
Maxim Dounin
574c96a586 Mp4: fixed build on win32 after r4689. 2012-06-26 12:31:40 +00:00
Ruslan Ermilov
a8e8b6b5c8 Added code to look up Google perftools in /opt/local/, for MacPorts. 2012-06-26 08:15:40 +00:00
Maxim Dounin
0e4f22012a Style. 2012-06-25 18:09:38 +00:00
Maxim Dounin
8ce648cf24 Incorrect tag release-1.2.1 removed.
Changes to misc/GNUmakefile was missed during stable-1.2 branch
creation, resulting in tag set on trunk, not on branch.

Reported by Marcel Gmuer.
2012-06-25 15:30:17 +00:00
Ruslan Ermilov
96cef18459 Fixed a harmless error in spelling of "Connection: close" when computing
the response header length.
2012-06-25 13:08:25 +00:00
Ruslan Ermilov
e0c5661fcc Fixed compile-time conditionals used to detect if X-Forwarded-For support
is needed.
2012-06-21 11:02:22 +00:00
Igor Sysoev
30cc28eaa7 Disabled gzip compression in OpenSSL prior to 1.0.0 version.
This saves about 522K per connection.
2012-06-20 12:55:28 +00:00
Ruslan Ermilov
146e36cf1b Added IPv6 support to ip_hash. 2012-06-19 12:36:54 +00:00
Maxim Dounin
c888914482 Upstream keepalive: "single" parameter deprecated.
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-18 14:23:42 +00:00
Maxim Dounin
574e987c26 Fixed return type of ngx_strerror_init(). 2012-06-18 14:12:03 +00:00
Maxim Dounin
338e278074 Fixed "sendmsg() failed" alerts on HP-UX.
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-18 14:11:29 +00:00
Maxim Dounin
21773a372a Fixed segfault with poll and resolver used.
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-18 14:10:50 +00:00
Maxim Dounin
1acd38af2e Changed default alignment to 16.
This fixes alignment problems observerd on ARMs, and likely also needed
for MIPSes.  Unless we know alignment is not required just assume we
need 16, which appears to be safe default for all architectures.

See here for details:
http://mailman.nginx.org/pipermail/nginx/2012-June/034139.html
2012-06-18 14:09:54 +00:00
Maxim Dounin
59fc7ee114 Fixed handling of conflicting wildcard server names.
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-18 14:06:00 +00:00
Maxim Dounin
17988b6c8b Mp4: fixed streaming if moov atom is at buffer edge. 2012-06-18 14:02:20 +00:00
Maxim Dounin
03fbf3c39d Mp4: fixed non-keyframe seeks in some cases (ticket #175).
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-18 14:01:18 +00:00
Andrey Belov
8424d1c513 Style fix. 2012-06-18 13:51:20 +00:00
Andrey Belov
2a11726cbf New core variable: $status.
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-18 13:43:44 +00:00
Ruslan Ermilov
ccf583800d When "resolver" is configured with a domain name, only the first
resolved address was used.  Now all addresses will be used.
2012-06-18 12:46:05 +00:00
Ruslan Ermilov
3391492b4b Fixed crash in ngx_resolver_cleanup_tree().
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-18 12:30:45 +00:00
Ruslan Ermilov
ada17a1be5 Version bump. 2012-06-18 11:07:44 +00:00
Ruslan Ermilov
27eb750330 Fixed spelling of "endianness", and called it "byte ordering" in the
user visible part.
2012-06-08 09:41:55 +00:00
Maxim Dounin
94686805e3 release-1.2.1 tag 2012-06-05 14:02:03 +00:00
Maxim Dounin
5ab78b4f1d release-1.3.1 tag 2012-06-05 13:47:50 +00:00
Maxim Dounin
e8474c8e73 nginx-1.3.1-RELEASE 2012-06-05 13:47:29 +00:00
Maxim Dounin
73368a5019 Win32: uris with ":$" are now rejected.
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-05 13:38:27 +00:00
Maxim Dounin
03accd8cba Win32: normalization of trailing dot inside uri.
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-05 13:37:29 +00:00
Maxim Dounin
f6d86c82f6 Win32: disallowed access to various non-canonical name variants.
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-05 13:36:09 +00:00
Ruslan Ermilov
19652a2a33 Support for IPv6 literals and an optional port in resolver. 2012-06-04 14:23:27 +00:00
Maxim Dounin
b4702b5708 Support for IPv6 literals in proxy_pass and so on. 2012-06-04 14:07:34 +00:00
Maxim Dounin
335998961b Upstream: least_conn compilation fixes.
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-04 00:00:28 +00:00
Maxim Dounin
4ae095f0d0 Upstream: weights support in ip_hash balancer. 2012-06-03 23:22:41 +00:00
Maxim Dounin
57fb58a1e8 Upstream: least_conn balancer module. 2012-06-03 23:21:26 +00:00
Maxim Dounin
eefc559c2b Resolver: fixed format specification.
Patch by Yichun Zhang (agentzh).
2012-06-03 23:18:24 +00:00
Ruslan Ermilov
079a30a5ac Code reduction (no functional changes). 2012-06-01 11:35:09 +00:00
Valentin Bartenev
8973fd9209 Removed mistaken setting of NGX_SSL_BUFFERED flag in ngx_ssl_send_chain()
if SSL buffer is not used.
2012-05-30 12:43:27 +00:00
Valentin Bartenev
5f909780bd Fixed returned value handling from the cookie rewrite handler.
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-30 12:30:03 +00:00
Ruslan Ermilov
2273b15eb5 geoip: got rid of ugly casts when calling ngx_free().
This is done by removing the "const" qualifier from the common return
type of handler functions returning either "const char *" or "char *".
2012-05-29 09:19:51 +00:00
Ruslan Ermilov
599b1c2e9e Fixed broken build. 2012-05-28 14:20:04 +00:00
Ruslan Ermilov
b64ab07328 Fixed memory leak if $geoip_org variable was used.
Patch by Denis F. Latypoff (slightly modified).
2012-05-28 13:17:48 +00:00
Ruslan Ermilov
da3525a877 Fixed the reuse of parsed DTDs and XSLTs.
Patch by Kuramoto Eiji.
2012-05-24 07:35:12 +00:00
Maxim Dounin
05933e3a32 Fixed compilation with -DNGX_DEBUG_MALLOC on FreeBSD 10.
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-23 15:07:01 +00:00
Maxim Dounin
8ee2806337 Fixed warning during nginx.xs compilation. 2012-05-23 10:36:12 +00:00
Ruslan Ermilov
17622dfdf1 Fixed potential null pointer dereference in ngx_resolver_create().
While here, improved error message.
2012-05-22 13:12:14 +00:00
Ruslan Ermilov
df1660c004 Removed historical and now redundant syntax pre-checks in ngx_parse_url(). 2012-05-21 10:55:10 +00:00
Maxim Dounin
d79d5818e6 Fixed core variables dynamic access after reconfiguration.
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-17 18:10:34 +00:00