Commit Graph

4339 Commits

Author SHA1 Message Date
Maxim Dounin
c96c4196f3 Entity tags: clear on entity changes. 2012-07-07 21:22:27 +00:00
Maxim Dounin
9c17e4cb66 Entity tags: support in If-Range header. 2012-07-07 21:21:15 +00:00
Maxim Dounin
13eb6898aa Entity tags: basic support in not modified filter.
This includes handling of ETag headers (if present in a response) with
basic support for If-Match, If-None-Match conditionals in not modified
filter.

Note that the "r->headers_out.last_modified_time == -1" check in the not
modified filter is left as is intentionally.  It's to prevent handling
of If-* headers in case of proxy without cache (much like currently
done with If-Modified-Since).
2012-07-07 21:20:27 +00:00
Maxim Dounin
a9456d55ab Not modified filter: tests separated from actions.
This makes code more extendable.  The only functional change is when
If-Modified-Since and If-Unmodified-Since are specified together, the
case which is explicitly left undefined by RFC 2616.  The new behaviour
is to respect them both, which seems better.
2012-07-07 21:18:30 +00:00
Maxim Dounin
4199620461 Added Last-Modified parsing in add_header.
This allows to use last modified time set in If-Range checks.  Code
simplified to improve readability.
2012-07-07 21:16:51 +00:00
Maxim Dounin
63d7ab16ff Fixed If-Range with unknown last modified time.
If modification time isn't known, skip range processing and return full
entity body instead of just ignoring If-Range.  Ignoring If-Range isn't
safe as client will assume entity wasn't changed since time specified.
2012-07-07 21:16:21 +00:00
Maxim Dounin
8aaf9d35b7 Configure: fixed "make" used instead of "${MAKE}". 2012-07-07 09:35:30 +00:00
Andrey Belov
3d87bcf9ae Corrected $request_length calculation for pipelined requests. 2012-07-06 04:27:06 +00:00
Ruslan Ermilov
bbfc96c703 Fixed typo in a function name. 2012-07-03 13:06:40 +00:00
Ruslan Ermilov
2219c566d7 Made sure to initialize the entire "struct flock" allocated on stack. 2012-07-03 13:05:18 +00:00
Maxim Dounin
3484e6d21c Reset r->uri_changed in a named location (ticket #184). 2012-07-03 11:30:05 +00:00
Maxim Dounin
a89762fe9c Typo fixed. 2012-07-03 11:28:54 +00:00
Ruslan Ermilov
f9c03b49eb map: strip final dot before looking up in a map of hostnames.
(closes #182)
2012-06-29 20:33:26 +00:00
Ruslan Ermilov
56cb80834c Version bump. 2012-06-29 11:03:01 +00:00
Maxim Dounin
5daba78f9c release-1.3.2 tag 2012-06-26 13:46:53 +00:00
Maxim Dounin
59b946a939 nginx-1.3.2-RELEASE 2012-06-26 13:46:23 +00:00
Maxim Dounin
a83578384c Mp4: fixed build on win32 after r4689. 2012-06-26 12:31:40 +00:00
Ruslan Ermilov
835ad6b98b Added code to look up Google perftools in /opt/local/, for MacPorts. 2012-06-26 08:15:40 +00:00
Maxim Dounin
c6d5225e5b Style. 2012-06-25 18:09:38 +00:00
Maxim Dounin
3669f43449 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
8c861f06c8 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
42444811b9 Fixed compile-time conditionals used to detect if X-Forwarded-For support
is needed.
2012-06-21 11:02:22 +00:00
Igor Sysoev
992a4d11da 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
36a931aba6 Added IPv6 support to ip_hash. 2012-06-19 12:36:54 +00:00
Maxim Dounin
29844cd55c 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
91c654debc Fixed return type of ngx_strerror_init(). 2012-06-18 14:12:03 +00:00
Maxim Dounin
97f7bf25c9 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
a769c530ff 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
c45bd10b1c 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
40a366c5a8 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
859dc4ce01 Mp4: fixed streaming if moov atom is at buffer edge. 2012-06-18 14:02:20 +00:00
Maxim Dounin
e1e2e2eb3a 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
0cf52376fb Style fix. 2012-06-18 13:51:20 +00:00
Andrey Belov
e91b210b56 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
2c49af818b 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
da8bb22634 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
b9feaa8dd9 Version bump. 2012-06-18 11:07:44 +00:00
Ruslan Ermilov
d4353c6fd3 Fixed spelling of "endianness", and called it "byte ordering" in the
user visible part.
2012-06-08 09:41:55 +00:00
Maxim Dounin
397a42eb44 release-1.2.1 tag 2012-06-05 14:02:03 +00:00
Maxim Dounin
b73d3fde21 release-1.3.1 tag 2012-06-05 13:47:50 +00:00
Maxim Dounin
b239607e04 nginx-1.3.1-RELEASE 2012-06-05 13:47:29 +00:00
Maxim Dounin
0d7720ddc0 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
f83598a359 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
db80a7adfc 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
ac7f704931 Support for IPv6 literals and an optional port in resolver. 2012-06-04 14:23:27 +00:00
Maxim Dounin
596226f6f7 Support for IPv6 literals in proxy_pass and so on. 2012-06-04 14:07:34 +00:00
Maxim Dounin
4888969baa 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
1ba6ecd4f3 Upstream: weights support in ip_hash balancer. 2012-06-03 23:22:41 +00:00
Maxim Dounin
4cb4e8d179 Upstream: least_conn balancer module. 2012-06-03 23:21:26 +00:00
Maxim Dounin
01f1e4d1dc Resolver: fixed format specification.
Patch by Yichun Zhang (agentzh).
2012-06-03 23:18:24 +00:00