Commit graph

4348 commits

Author SHA1 Message Date
Ruslan Ermilov
d2fb59e6a8 Fixed sorting of listen addresses so that wildcard address is always at
the end (closes #187).  Failure to do so could result in several listen
sockets to be created instead of only one listening on wildcard address.

Reported by Roman Odaisky.
2012-07-17 04:47:34 +00:00
Ruslan Ermilov
9d80c31e8d Version bump. 2012-07-17 04:42:38 +00:00
Ruslan Ermilov
47a33df3cc Synchronized the license text with the FreeBSD's bsd-style-copyright. 2012-07-10 12:40:35 +00:00
Maxim Dounin
b9df52e78d release-1.3.3 tag 2012-07-10 12:20:30 +00:00
Maxim Dounin
0710b4783c nginx-1.3.3-RELEASE 2012-07-10 12:20:10 +00:00
Maxim Dounin
0ee155d244 Entity tags: empty etags handling in If-Range.
Entity tag may be of length 2 as per RFC 2616, i.e. double quotes only.
Pointed out by Ruslan Ermilov.
2012-07-09 17:04:37 +00:00
Maxim Dounin
924cb17b60 Entity tags: the "etag" directive.
It allows to disable generation of nginx's own entity tags, while
still handling ETags in cache properly.  This may be useful e.g.
if one want to serve static files from servers with different ETag
generation algorithms.
2012-07-09 14:53:42 +00:00
Maxim Dounin
8e303db828 Entity tags: set for static respones. 2012-07-09 00:13:06 +00:00
Maxim Dounin
1d6020921e Entity tags: handling in add_header.
Notably this allows to clear ETag if one want to for some reason.
2012-07-07 21:24:01 +00:00
Maxim Dounin
9a59a5d4f6 Entity tags: clear on entity changes. 2012-07-07 21:22:27 +00:00
Maxim Dounin
4933ade4e2 Entity tags: support in If-Range header. 2012-07-07 21:21:15 +00:00
Maxim Dounin
27435f7124 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
344cac9554 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
cbdd6b4c1d 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
4d3cb3aa06 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
1c6b7b24b2 Configure: fixed "make" used instead of "${MAKE}". 2012-07-07 09:35:30 +00:00
Andrey Belov
aff2878083 Corrected $request_length calculation for pipelined requests. 2012-07-06 04:27:06 +00:00
Ruslan Ermilov
9f054becb3 Fixed typo in a function name. 2012-07-03 13:06:40 +00:00
Ruslan Ermilov
718505bcd7 Made sure to initialize the entire "struct flock" allocated on stack. 2012-07-03 13:05:18 +00:00
Maxim Dounin
4c40827b6f Reset r->uri_changed in a named location (ticket #184). 2012-07-03 11:30:05 +00:00
Maxim Dounin
ac789f385c Typo fixed. 2012-07-03 11:28:54 +00:00
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