summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-09-27FastCGI: non-buffered mode support.Maxim Dounin1-8/+230
2013-09-27Upstream: subrequest_in_memory support for SCGI and uwsgi enabled.Maxim Dounin2-14/+0
This was missed in 9d59a8eda373 when non-buffered support was added to SCGI and uwsgi.
2013-09-27Upstream: proxy_no_cache, fastcgi_no_cache warnings removed.Maxim Dounin2-12/+0
2013-09-23Proxy: added the "proxy_ssl_ciphers" directive.Piotr Sikora1-0/+22
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-09-22SSL: stop loading configs with invalid "ssl_ciphers" values.Piotr Sikora1-0/+1
While there, remove unnecessary check in ngx_mail_ssl_module. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-09-19Proxy: added the "proxy_ssl_protocols" directive.Andrei Belov1-10/+40
2013-09-04Handling of ngx_int_t != intptr_t case.Maxim Dounin2-5/+5
Casts between pointers and integers produce warnings on size mismatch. To silence them, cast to (u)intptr_t should be used. Prevoiusly, casts to ngx_(u)int_t were used in some cases, and several ngx_int_t expressions had no casts. As of now it's mostly style as ngx_int_t is defined as intptr_t.
2013-09-04Win32: $request_time fixed.Maxim Dounin1-1/+1
On win32, time_t is 64 bits wide by default, and passing an ngx_msec_int_t argument for %T format specifier doesn't work. This doesn't manifest itself on other platforms as time_t and ngx_msec_int_t are usually of the same size.
2013-09-04Win32: Borland C compatibility fixes.Maxim Dounin4-7/+11
Several false positive warnings silenced, notably W8012 "Comparing signed and unsigned" (due to u_short values promoted to int), and W8072 "Suspicious pointer arithmetic" (due to large type values added to pointers). With this patch, it's now again possible to compile nginx using bcc32, with options we normally compile on win32 minus ipv6 and ssl.
2013-09-04Win32: Open Watcom C compatibility fixes.Maxim Dounin1-1/+1
Precompiled headers are disabled as they lead to internal compiler errors with long configure lines. Couple of false positive warnings silenced. Various win32 typedefs are adjusted to work with Open Watcom C 1.9 headers. With this patch, it's now again possible to compile nginx using owc386, with options we normally compile on win32 minus ipv6 and ssl.
2013-08-29Referer: fixed hostname buffer overflow check.Valentin Bartenev1-3/+3
Because of premature check the effective buffer size was 255 symbols while the buffer is able to handle 256.
2013-08-29Referer: "server_names" parsing deferred to merge phase.Sergey Kandaurov1-33/+45
This allows to approach "server_name" values specified below the "valid_referers" directive when used within the "server_names" parameter, e.g.: server_name example.org; valid_referers server_names; server_name example.com; As a bonus, this fixes bogus error with "server_names" specified several times.
2013-08-29Referer: fixed server_name regex matching.Sergey Kandaurov1-22/+67
The server_name regexes are normally compiled for case-sensitive matching. This violates case-insensitive obligations in the referer module. To fix this, the host string is converted to lower case before matching. Previously server_name regex was executed against the whole referer string after dropping the scheme part. This could led to an improper matching, e.g.: server_name ~^localhost$; valid_referers server_names; Referer: http://localhost/index.html It was changed to look only at the hostname part. The server_name regexes are separated into another array to not clash with regular regexes.
2013-08-29Referer: fixed error type usage inconsistency for ngx_http_add*().Sergey Kandaurov1-15/+15
2013-08-28Image filter: large image handling.Lanshun Zhou1-1/+6
If Content-Length header is not set, and the image size is larger than the buffer size, client will hang until a timeout occurs. Now NGX_HTTP_UNSUPPORTED_MEDIA_TYPE is returned immediately. diff -r d1403de41631 -r 4fae04f332b4 src/http/modules/ngx_http_image_filter_module.c
2013-07-30Autoindex: improved ngx_de_info() error handling.Sergey Kandaurov1-1/+1
This allows to build a directory listing whenever a loop exists in symbolic link resolution of the path argument.
2013-07-30Autoindex: return NGX_ERROR on error if headers were sent.Sergey Kandaurov1-2/+2
This prevents ngx_http_finalize_request() from issuing ngx_http_special_response_handler() on a freed context.
2013-08-20Backed out f1a91825730a and 7094bd12c1ff.Maxim Dounin4-8/+4
While ngx_get_full_name() might have a bit more descriptive arguments, the ngx_conf_full_name() is generally easier to use when parsing configuration and limits exposure of cycle->prefix / cycle->conf_prefix details.
2013-08-21Auth request module import.Maxim Dounin1-0/+444
2013-08-13Referer module: fixed regex matching against HTTPS referers.Sergey Kandaurov1-1/+3
When matching a compiled regex against value in the "Referer" header field, the length was calculated incorrectly for strings that start from "https://". This might cause matching to fail for regexes with end-of-line anchors. Patch by Liangbin Li.
2013-08-06Replaced ngx_conf_full_name() with ngx_get_full_name().Valentin Bartenev4-4/+8
The ngx_get_full_name() function takes more readable arguments list.
2013-08-05Image filter: use "application/json" MIME type for JSON output.Valentin Bartenev1-1/+1
As it is defined by RFC 4627, and allows for various browser tools like JSONView to display JSON well-formatted.
2013-07-31MIME: use "application/javascript" for .js files.Valentin Bartenev1-1/+1
Though there are several MIME types commonly used for JavaScript nowadays, the most common being "text/javascript", "application/javascript", and currently used by nginx "application/x-javascript", RFC 4329 prefers "application/javascript". The "charset_types" directive's default value was adjusted accordingly.
2013-07-29Perl: fixed syntax usage for C preprocessor directives.Sergey Kandaurov1-7/+4
As per perlxs, C preprocessor directives should be at the first non-whitespace of a line to avoid interpreting them as comments. #if and #endif are moved so that there are no blank lines before them to retain them as part of the function body.
2013-07-25Upstream: added check if a response is complete.Maxim Dounin1-1/+1
Checks were added to both buffered and unbuffered code paths to detect and complain if a response is incomplete. Appropriate error codes are now passed to ngx_http_upstream_finalize_request(). With this change in unbuffered mode we now use u->length set to -1 as an indicator that EOF is allowed per protocol and used to indicate response end (much like its with p->length in buffered mode). Proxy module was changed to set u->length to 1 (instead of previously used -1) in case of chunked transfer encoding used to comply with the above.
2013-07-25Upstream: u->length now defaults to -1 (API change).Maxim Dounin1-1/+4
That is, by default we assume that response end is signalled by a connection close. This seems to be better default, and in line with u->pipe->length behaviour. Memcached module was modified accordingly.
2013-07-25Gzip: clearing of c->buffered if all data are flushed.Maxim Dounin1-2/+4
This allows to finalize unfinished responses while still sending as much data as available.
2013-07-25Sub filter: fixed matching after a partial match.Maxim Dounin1-31/+69
After a failed partial match we now check if there is another partial match in previously matched substring to fix cases like "aab" in "aaab". The ctx->saved string is now always sent if it's present on return from the ngx_http_sub_parse() function (and reset accordingly). This allows to release parts of previously matched data.
2013-07-25Sub filter: fixed incomplete last buffer on partial match.Maxim Dounin1-0/+20
If a pattern was partially matched at a response end, partially matched string wasn't send. E.g., a response "fo" was truncated to an empty response if partially mathed by a pattern "foo".
2013-07-25Sub filter: flush buffers handling.Maxim Dounin1-1/+4
2013-07-25Sub filter: switched to ngx_chain_get_free_buf().Maxim Dounin1-62/+23
No functional changes.
2013-07-25Sub filter: stale comments removed.Maxim Dounin1-3/+0
2013-07-19Xslt: exsltRegisterAll() moved to preconfiguration.Maxim Dounin1-2/+10
The exsltRegisterAll() needs to be called before XSLT stylesheets are compiled, else stylesheet compilation hooks will not work. This change fixes EXSLT Functions extension.
2013-07-11Core: extended ngx_sock_ntop() with socklen parameter.Vladimir Homutov1-1/+2
On Linux, sockaddr length is required to process unix socket addresses properly due to unnamed sockets (which don't have sun_path set at all) and abstract namespace sockets.
2013-06-10Perl: fixed r->header_in("Cookie") (ticket #351).Maxim Dounin1-9/+27
It was broken by X-Forwarded-For related changes in f7fe817c92a2 (1.3.14) as hh->offset is no longer 0 for Cookie.
2013-06-05Status: the "last_in_chain" flag must be set.Valentin Bartenev1-0/+1
The module always produces only one and obviously the last buffer in chain.
2013-05-30Access: support for UNIX-domain client addresses (ticket #359).Ruslan Ermilov1-35/+111
2013-05-27Upstream: http_403 support in proxy_next_upstream (and friends).Maxim Dounin4-0/+4
The parameter is mostly identical to http_404, and is expected to be used in similar situations. The 403 code might be returned by a backend instead of 404 on initial sync of new directories with rsync. See here for feature request and additional details: http://mailman.nginx.org/pipermail/nginx-ru/2013-April/050920.html
2013-05-24Xslt: xslt_last_modified directive.Maxim Dounin1-4/+22
Directive is similar to ssi_last_modified and sub_filter_last_modified directives introduced by previous commits.
2013-05-24Sub filter: sub_filter_last_modified directive.Maxim Dounin1-1/+14
Directive is similar to ssi_last_modified introduced by previous commit. Patch by Alexey Kolpakov.
2013-05-24SSI: ssi_last_modified directive.Maxim Dounin1-1/+14
The "ssi_last_modified" directive allows to preserve Last-Modified header in SSI responses. The directive is similar to SSILastModified one available in Apache: http://httpd.apache.org/docs/2.4/mod/mod_include.html#ssilastmodified Patch by Alexey Kolpakov.
2013-05-23Memcached: stricten header validation.Ruslan Ermilov1-9/+17
An invalid memcached reply that started with '\n' could cause segmentation fault. An invalid memcached reply "VALUE / 0 2\r?ok\r\nEND\r\n" was considered as a valid response. In addition, if memcached reports that the key was not found, set u->headers_in.content_length_n to 0. This ensures that ngx_http_memcached_filter() will not be called while previous code relied on always intercepting 404. Initialization of ctx->rest was moved to where it belongs.
2013-05-22Referer module: added $invalid_referer to variables hash.Maxim Dounin1-2/+1
This makes it accessible via dynamic lookup with ngx_http_get_variable() from Perl, SSI, etc. Patch by Yichun Zhang (agentzh).
2013-05-21Upstream: fixed fail_timeout and max_fails > 1.Maxim Dounin1-1/+4
Due to peer->checked always set since rev. c90801720a0c (1.3.0) by round-robin and least_conn balancers (ip_hash not affected), the code in ngx_http_upstream_free_round_robin_peer() function incorrectly reset peer->fails too often. Reported by Dmitry Popov, http://mailman.nginx.org/pipermail/nginx-devel/2013-May/003720.html
2013-05-21Fixed error logging.Sergey Kandaurov1-1/+1
The provided argument list didn't follow a used format string.
2013-05-15Upstream keepalive: slightly simplified code.Ruslan Ermilov1-5/+2
2013-05-15Proxy: clear script engine used to calculate lengths.Maxim Dounin1-0/+2
Previous code is believed to be safe, but might access uninitialized memory (e.g., e->quote).
2013-05-11Proxy: $proxy_internal_body_length fixed.Maxim Dounin1-1/+2
The $proxy_internal_body_length value might change during request lifetime, notably if proxy_set_body used, and use of a cached value might result in incorrect upstream requests. Patch by Lanshun Zhou.
2013-05-11Mp4: indentation and style, no functional changes.Maxim Dounin1-31/+39
2013-05-11Perl: extra "return" removed.Maxim Dounin1-1/+1