summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-11-28Added (void) as we intentionally ignore returned values.Maxim Dounin2-2/+2
Requested by Igor Sysoev.
2011-11-28Allowed add_header for proxied 206 replies.Maxim Dounin1-0/+1
It was working for nginx's own 206 replies as they are seen as 200 in the headers filter module (range filter goes later in the headers filter chain), but not for proxied replies.
2011-11-28Added support for IP-literal in the Host header and request line (ticket #1).Valentin Bartenev2-26/+115
Additional parsing logic added to correctly handle RFC 3986 compliant IPv6 and IPvFuture characters enclosed in square brackets. The host validation was completely rewritten. The behavior for non IP literals was changed in a more proper and safer way: - Host part is now delimited either by the first colon or by the end of string if there's no colon. Previously the last colon was used as delimiter which allowed substitution of a port number in the $host variable. (e.g. Host: 127.0.0.1:9000:80) - Fixed stripping of the ending dot in the Host header when the host was also followed by a port number. (e.g. Host: nginx.com.:80) - Fixed upper case characters detection. Previously it was broken which led to wasting memory and CPU.
2011-11-25Added escaping of double quotes in ngx_escape_html().Maxim Dounin1-0/+9
Patch by Zaur Abasmirzoev.
2011-11-23Unlock of shared memory zones on process crash.Maxim Dounin1-11/+50
If process exited abnormally while holding lock on some shared memory zone - unlock it. It may be not safe thing to do (as crash with lock held may result in corrupted shared memory structure, and other processes will subsequently crash while trying to access shared data), therefore complain loudly if unlock succeeds.
2011-11-23Fixed build without atomic operations.Maxim Dounin1-2/+2
2011-11-23Added shmtx interface to forcibly unlock mutexes.Maxim Dounin6-49/+86
It is currently used from master process on abnormal worker termination to unlock accept mutex (unlocking of accept mutex was broken in 1.0.2). It is expected to be used in the future to unlock other mutexes as well. Shared mutex code was rewritten to make this possible in a safe way, i.e. with a check if lock was actually held by the exited process. We again use pid to lock mutex, and use separate atomic variable for a count of processes waiting in sem_wait().
2011-11-23Fixed "rotate" to always work when combined with "resize/crop".Ruslan Ermilov1-1/+5
2011-11-23Cosmetics.Ruslan Ermilov1-3/+3
2011-11-23Fix of mp4 module seeking.Igor Sysoev1-1/+1
2011-11-22Protection from stale write events in epoll.Maxim Dounin1-0/+12
Stale write event may happen if epoll_wait() reported both read and write events, and processing of the read event closed descriptor. Patch by Yichun Zhang (agentzh).
2011-11-22Fixed segfault on ssl servers without cert with SNI (ticket #54).Maxim Dounin1-12/+14
Non-default servers may not have ssl context created if there are no certificate defined. Make sure to check if ssl context present before using it.
2011-11-21Fixed "keepalive_disable".Ruslan Ermilov1-1/+1
Patch by Alexander Usov. The bug has been introduced in r4267.
2011-11-18FreeBSD 10-current has recently gotten POSIX_FADV_* macros.Maxim Konovalov1-1/+1
A fix for the broken build applied. Patch from Igor Sysoev.
2011-11-18Upstream: don't cache unfinished responses.Maxim Dounin1-2/+10
Check if received data length match Content-Length header (if present), don't cache response if no match found. This prevents caching of corrupted response in case of premature connection close by upstream.
2011-11-18Fixed flv header to match specification.Maxim Dounin1-1/+1
Used "\x5" in 5th byte to claim presence of both audio and video. Used previous tag size 0 in the beginning of the flv body (bytes 10 .. 13) as required by specification (see http://www.adobe.com/devnet/f4v.html). Patch by Piotr Sikora.
2011-11-16Silenced a warning for some compilers.Ruslan Ermilov1-0/+1
2011-11-16Now nginx uses TTL of a DNS response when calculating cache validity.Ruslan Ermilov1-6/+38
Previously it used a hardcoded value of 300 seconds. Also added the "valid=" parameter to the "resolver" directive that can be used to override the cache validity time. Patch by Kirill A. Korinskiy with minor changes.
2011-11-16Fixed incorrect counting the length of headers in a SCGI request.Valentin Bartenev1-1/+3
2011-11-15Fixed handling of SIGWINCH/NOACCEPT signal.Maxim Dounin1-0/+4
After first upgrade it was ignored since r4020 (1.1.1, 1.0.9) as ngx_daemonized wasn't set.
2011-11-15Version bump.Maxim Dounin2-3/+3
2011-11-14Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()Igor Sysoev4-18/+38
for output of ./configure options, etc., since ngx_log_stderr() output length is limited by 2048 characters defined as NGX_MAX_ERROR_STR.
2011-11-14Fix of "Content-Length" header of MP4 response if start argument was used.Igor Sysoev1-1/+2
Patch by Piotr Sikora.
2011-11-14Renamed ngx_http_limit_zone_module to ngx_http_limit_conn_module.Valentin Bartenev2-103/+103
2011-11-14Reverted incorrect change in internal md5 (part of r3928).Maxim Dounin1-1/+2
2011-11-14Fixed fastcgi/scgi/uwsgi_param inheritance.Maxim Dounin3-90/+174
The following problems were fixed: 1. Directive fastcgi_cache affected headers sent to backends in unrelated servers / locations (see ticket #45). 2. If-Unmodified-Since, If-Match and If-Range headers were sent to backends if fastcgi_cache was used. 3. Cache-related headers were sent to backends if there were no fastcgi_param directives and fastcgi_cache was used at server level.
2011-11-14Separate functions to merge fastcgi/scgi/uwsgi params.Maxim Dounin3-87/+123
No functional changes.
2011-11-14Fixed Upgrade header clearing with proxy_cache.Maxim Dounin1-0/+1
This was missed in proxy HTTP/1.1 support commit (r4127).
2011-11-14Fixed proxy_set_header inheritance with proxy_set_body.Maxim Dounin1-17/+12
2011-11-14Fixed proxy_set_header inheritance with proxy_cache (ticket #45).Maxim Dounin1-9/+23
Headers cleared with cache enabled (If-Modified-Since etc.) might be cleared in unrelated servers/locations without proxy_cache enabled if proxy_cache was used in some server/location. Example config which triggered the problem: proxy_set_header X-Test "test"; server { location /1 { proxy_cache name; proxy_pass ... } } server { location /2 { proxy_pass ... } } Another one: server { proxy_cache name; location /1 { proxy_pass ... } location /2 { proxy_cache off; proxy_pass ... } } In both cases If-Modified-Since header wasn't sent to backend in location /2. Fix is to not modify conf->headers_source, but instead merge user-supplied headers from conf->headers_source and default headers (either cache or not) into separate headers_merged array.
2011-11-14Fixed NGX_CONF_TAKE1/NGX_CONF_FLAG misuse.Sergey Budnevitch4-5/+5
2011-11-10Limit zone: added the "limit_conn_zone" directive.Valentin Bartenev1-3/+132
It supersedes old "limit_zone" directive (deprecated accordingly) and uses syntax consistent with the "limit_req_zone" directive.
2011-11-10Limit zone: support for multiple "limit_conn" limits.Valentin Bartenev1-73/+117
2011-11-10Limit zone: rbtree lookup moved to a separate function.Valentin Bartenev1-51/+73
No functional changes.
2011-11-10Changed error message to be more appropriate in the imaginaryRuslan Ermilov1-1/+1
"open_file_cache max=0" case.
2011-11-09Fixed compression pointer processing in DNS response greater than 255 bytes.Igor Sysoev1-7/+7
Thanks to Ben Hawkes.
2011-11-08Fix of "keepalive_disable" directive.Igor Sysoev1-6/+8
2011-11-08The "image_filter_sharpen" directive.Igor Sysoev1-1/+71
2011-11-01Ancient incomplete ngx_http_status_module removal.Igor Sysoev1-309/+0
2011-11-01Version bump.Igor Sysoev2-3/+3
2011-10-31Silently ignoring a stale global SSL error left after disabled renegotiation.Igor Sysoev1-0/+7
2011-10-31Fixed segfault on configuration testing with ssl (ticket #37).Maxim Dounin1-1/+10
The following config caused segmentation fault due to conf->file not being properly set if "ssl on" was inherited from the http level: http { ssl on; server { } }
2011-10-31Event pipe: reduced number of file buffers used.Maxim Dounin2-22/+55
If possible we now just extend already present file buffer in p->out chain instead of keeping ngx_buf_t for each buffer we've flushed to disk. This saves about 120 bytes of memory per buffer flushed to disk, and resolves high CPU usage observed in edge cases (due to coalescing these buffers on send).
2011-10-31Event pipe: fixes for complex protocols.Maxim Dounin1-63/+20
1. In ngx_event_pipe_write_chain_to_temp_file() make sure to fully write all shadow buffers up to last_shadow. With this change recycled buffers cannot appear in p->out anymore. This also fixes segmentation faults observed due to ngx_event_pipe_write_chain_to_temp() not freeing any raw buffers while still returning NGX_OK. 2. In ngx_event_pipe_write_to_downstream() we now properly check for busy size as a size of buffers, not a size of data in these buffers. This fixes situations where all available buffers became busy (including segmentation faults due to this). 3. The ngx_event_pipe_free_shadow_raw_buf() function is dropped. It's incorrect and not needed.
2011-10-25Decrease of log level of some SSL handshake errors.Igor Sysoev1-1/+19
2011-10-25Fixed port range checking.Ruslan Ermilov2-4/+4
2011-10-25Fixed range checking for the "somaxconn" sysctl.Ruslan Ermilov2-12/+5
2011-10-24Support of several servers in the "resolver" directive.Igor Sysoev4-51/+58
Patch by Kirill A. Korinskiy.
2011-10-24Using of junk value in slab allocator similar to modern FreeBSD values.Igor Sysoev1-2/+2
2011-10-24malloc() debugging on MacOSX.Igor Sysoev13-9/+48