summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
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
2013-04-29Proxy: allocate $proxy_internal_body_length from request pool.Ruslan Ermilov1-1/+1
2013-04-23Perl: request body handling fixed.Maxim Dounin1-3/+36
As of 1.3.9, chunked request body may be available with r->headers_in.content_length_n <= 0. Additionally, request body may be in multiple buffers even if r->request_body_in_single_buf was requested.
2013-04-19Configure: fixed perl Makefile generation (ticket #334).Maxim Dounin1-1/+1
Dependancy tracking introduced in r5169 were not handled absolute path names properly. Absolute names might appear in CORE_DEPS if --with-openssl or --with-pcre configure arguments are used to build OpenSSL/PCRE libraries. Additionally, revert part of r5169 to set NGX_INCS from Makefile variables. Makefile variables have $ngx_include_opt in them, which might result in wrong include paths being used. As a side effect, this also restores build with --with-http_perl_module and --without-http at the same time.
2013-04-12Upstream: warn if multiple non-stackable balancers are installed.Ruslan Ermilov2-0/+10
2013-04-10Configure: fixed nginx.so rebuild (broken by r5145).Maxim Dounin1-2/+4
To avoid further breaks it's now done properly, all the dependencies are now passed to Makefile.PL. While here, fixed include list passed to Makefile.PL to use Makefile variables rather than a list expanded during configure.
2013-04-03Limit req: rate should be non-zero.Valentin Bartenev1-1/+1
Specifying zero rate caused division by zero when calculating delays.
2013-03-28Simplified nginx version maintenance.Ruslan Ermilov1-1/+1
It's no longer necessary to update src/http/modules/perl/nginx.pm when version is bumped, as it's now derived from src/core/nginx.h.
2013-03-27Version bump.Maxim Dounin1-1/+1
2013-03-25Upstream: removed double-free workarounds in peer.free() methods.Ruslan Ermilov2-15/+1
2013-03-21Split clients: check length when parsing configuration.Ruslan Ermilov1-1/+1
2013-03-21Fixed language in a comment preceding ngx_http_index_handler().Ruslan Ermilov1-5/+5
2013-03-21Use NGX_DEFAULT_POOL_SIZE macro where appropriate.Ruslan Ermilov2-3/+3
2013-03-20Preliminary experimental support for SPDY draft 2.Valentin Bartenev1-1/+16
2013-03-19Image filter: the "image_filter_interlace" directive.Ruslan Ermilov1-0/+13
Patch by Ian Babrou, with minor changes.
2013-03-18The limit_req_status and limit_conn_status directives.Maxim Dounin2-3/+36
Patch by Nick Marden, with minor changes.