summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_memcached_module.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-05-30All known output headers can be linked lists now.Maxim Dounin1-0/+1
The h->next pointer properly provided as NULL in all cases where known output headers are added. Note that there are 3rd party modules which might not do this, and it might be risky to rely on this for arbitrary headers.
2020-07-06Memcached: protect from too long responses.Maxim Dounin1-3/+6
If a memcached response was followed by a correct trailer, and then the NUL character followed by some extra data - this was accepted by the trailer checking code. This in turn resulted in ctx->rest underflow and caused negative size buffer on the next reading from the upstream, followed by the "negative size buf in writer" alert. Fix is to always check for too long responses, so a correct trailer cannot be followed by extra data.
2018-10-03Upstream: proxy_socket_keepalive and friends.Vladimir Homutov1-0/+11
The directives enable the use of the SO_KEEPALIVE option on upstream connections. By default, the value is left unchanged.
2018-07-17Fixed invalid access to location defined as an empty string.Ruslan Ermilov1-1/+1
2018-03-19Upstream: fixed comments after 13f8dec720b5.Ruslan Ermilov1-2/+0
The fields "uri", "location", and "url" from ngx_http_upstream_conf_t moved to ngx_http_proxy_loc_conf_t and ngx_http_proxy_vars_t, reflect this change in create_loc_conf comments.
2015-12-18Upstream: the "transparent" parameter of proxy_bind and friends.Roman Arutyunyan1-1/+1
This parameter lets binding the proxy connection to a non-local address. Upstream will see the connection as coming from that address. When used with $remote_addr, upstream will accept the connection from real client address. Example: proxy_bind $remote_addr transparent;
2016-03-31Fixed logging.Sergey Kandaurov1-1/+1
2015-04-21Memcached: enabled ranges.Martin Mlynář1-0/+1
2014-09-12Upstream: limited next_upstream time and tries (ticket #544).Roman Arutyunyan1-0/+22
The new directives {proxy,fastcgi,scgi,uwsgi,memcached}_next_upstream_tries and {proxy,fastcgi,scgi,uwsgi,memcached}_next_upstream_timeout limit the number of upstreams tried and the maximum time spent for these tries when searching for a valid upstream.
2014-08-06Style: use specified macro instead of magic-number.Tatsuhiko Kubo1-1/+1
2014-07-09Style: use ngx_str_set().Tatsuhiko Kubo1-5/+2
2013-09-04Win32: Borland C compatibility fixes.Maxim Dounin1-1/+1
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-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-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-01-16Fixed and improved the "*_bind" directives of proxying modules.Ruslan Ermilov1-0/+4
The "proxy_bind", "fastcgi_bind", "uwsgi_bind", "scgi_bind" and "memcached_bind" directives are now inherited; inherited value can be reset by the "off" parameter. Duplicate directives are now detected. Parameter value can now contain variables.
2012-09-10Memcached: memcached_gzip_flag directive.Maxim Dounin1-8/+56
This directive allows to test desired flag as returned by memcached and sets Content-Encoding to gzip if one found. This is reimplementation of patch by Tomash Brechko as available on http://openhack.ru/. It should be a bit more correct though (at least I think so). In particular, it doesn't try to detect if we are able to gunzip data, but instead just sets correct Content-Encoding.
2012-02-28Fixed spelling in single-line comments.Ruslan Ermilov1-2/+2
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-09-15Keepalive support in memcached.Maxim Dounin1-0/+16
2011-09-15Upstream: r->upstream->length type change to off_t.Maxim Dounin1-1/+1
Previous use of size_t may cause wierd effects on 32bit platforms with certain big responses transferred in unbuffered mode. Nuke "if (size > u->length)" check as it's not usefull anyway (preread body data isn't subject to this check) and now requires additional check for u->length being positive.
2011-09-15Upstream: content_length_n API change.Maxim Dounin1-2/+2
We no longer use r->headers_out.content_length_n as a primary source of backend's response length. Instead we parse response length to u->headers_in.content_length_n and copy to r->headers_out.content_length_n when needed.
2010-05-20delete warnings of proxy_upstream_max_fails, proxy_upstream_fail_timeout,Igor Sysoev1-45/+0
fastcgi_upstream_max_fails, fastcgi_upstream_fail_timeout, memcached_upstream_max_fails, and memcached_upstream_fail_timeout directives obsolete since 0.5.0 version
2010-05-14ngx_str_set() and ngx_str_null()Igor Sysoev1-3/+1
2010-04-01revert partially r1555 and fix the error "memcached sent invalid trailer"Igor Sysoev1-3/+8
2009-12-23fix typoIgor Sysoev1-1/+1
2009-11-02proxy_bind, fastcgi_bind, and memcached_bindIgor Sysoev1-0/+7
2009-08-29fix request counter for memcached, introduced in r3050Igor Sysoev1-0/+2
2009-07-27ngx_http_upstream_create() to cleanup the previous upstream afterIgor Sysoev1-12/+5
internal redirect
2009-06-02return NULL instead of NGX_CONF_ERROR on a create conf failureIgor Sysoev1-1/+1
2008-12-10change variable nameIgor Sysoev1-6/+6
2008-12-10delete surplus upstream.schema fieldIgor Sysoev1-7/+3
2008-09-05remove unused #include'sIgor Sysoev1-1/+0
2008-03-03fix memory leak in long-lived non buffered connectionsIgor Sysoev1-0/+1
2007-12-27allow memached_pass inside "if" blockIgor Sysoev1-1/+1
2007-12-27inherit $memached_key index and memcached_pass upstream inside "if" blockIgor Sysoev1-2/+11
2007-11-27proxy_pass variables supportIgor Sysoev1-2/+2
2007-10-15memcached did not set $upstream_response_timeIgor Sysoev1-0/+2
2007-10-01two commits those go together by mistakeIgor Sysoev1-8/+8
*) fix gzip broken in r1544 *) fix memcached END test
2007-09-29style fixIgor Sysoev1-3/+3
2007-08-07omit unnecessary conditionsIgor Sysoev1-1/+1
2007-08-06rename ngx_http_discard_body() to ngx_http_discard_request_body()Igor Sysoev1-1/+1
2007-07-22escape space, etc in $memcached_keyIgor Sysoev1-2/+11
2007-07-22omit unnecessary codeIgor Sysoev1-3/+0
2007-06-07namespace may be set via $memcached_keyIgor Sysoev1-1/+0
2007-01-29eliminate the useless space symbolIgor Sysoev1-2/+2
2007-01-25$memcached_keyIgor Sysoev1-14/+31
2006-12-12rewritten upstreamIgor Sysoev1-1/+0
2006-12-11fix fastcgi and memcached upstreamsIgor Sysoev1-0/+1
2006-12-04upstream choice modulesIgor Sysoev1-38/+43
2006-10-25style fix: remove trailing spacesIgor Sysoev1-1/+1