[nginx] svn commit: r5002 - trunk/src/core

2013-01-08 Thread vbart
Author: vbart Date: 2013-01-08 14:01:57 + (Tue, 08 Jan 2013) New Revision: 5002 URL: http://trac.nginx.org/nginx/changeset/5002/nginx Log: The data pointer in ngx_open_file_t objects must be initialized. Uninitialized pointer may result in arbitrary segfaults if access_log is used without

[nginx] svn commit: r5003 - trunk/src/event

2013-01-08 Thread vbart
Author: vbart Date: 2013-01-08 14:03:37 + (Tue, 08 Jan 2013) New Revision: 5003 URL: http://trac.nginx.org/nginx/changeset/5003/nginx Log: Events: added check for duplicate "events" directive. Modified: trunk/src/event/ngx_event.c Modified: trunk/src/event/n

[nginx] svn commit: r5019 - trunk/src/event

2013-01-28 Thread vbart
Author: vbart Date: 2013-01-28 15:34:09 + (Mon, 28 Jan 2013) New Revision: 5019 URL: http://trac.nginx.org/nginx/changeset/5019/nginx Log: SSL: removed conditions that always hold true. Modified: trunk/src/event/ngx_event_openssl.c Modified: trunk/src/event/ngx_event_openssl.c

[nginx] svn commit: r5020 - trunk/src/event

2013-01-28 Thread vbart
Author: vbart Date: 2013-01-28 15:35:12 + (Mon, 28 Jan 2013) New Revision: 5020 URL: http://trac.nginx.org/nginx/changeset/5020/nginx Log: SSL: resetting of flush flag after the data was written. There is no need to flush next chunk of data if it does not contain a buffer with the flush or

[nginx] svn commit: r5021 - trunk/src/event

2013-01-28 Thread vbart
Author: vbart Date: 2013-01-28 15:37:11 + (Mon, 28 Jan 2013) New Revision: 5021 URL: http://trac.nginx.org/nginx/changeset/5021/nginx Log: SSL: preservation of flush flag for buffered data. Previously, if SSL buffer was not sent we lost information that the data must be flushed. Modified

[nginx] svn commit: r5022 - trunk/src/event

2013-01-28 Thread vbart
Author: vbart Date: 2013-01-28 15:38:36 + (Mon, 28 Jan 2013) New Revision: 5022 URL: http://trac.nginx.org/nginx/changeset/5022/nginx Log: SSL: calculation of buffer size moved closer to its usage. No functional changes. Modified: trunk/src/event/ngx_event_openssl.c Modified: trunk

[nginx] svn commit: r5023 - trunk/src/event

2013-01-28 Thread vbart
Author: vbart Date: 2013-01-28 15:40:25 + (Mon, 28 Jan 2013) New Revision: 5023 URL: http://trac.nginx.org/nginx/changeset/5023/nginx Log: SSL: avoid calling SSL_write() with zero data size. According to documentation, calling SSL_write() with num=0 bytes to be sent results in undefined

[nginx] svn commit: r5024 - trunk/src/event

2013-01-28 Thread vbart
Author: vbart Date: 2013-01-28 15:41:12 + (Mon, 28 Jan 2013) New Revision: 5024 URL: http://trac.nginx.org/nginx/changeset/5024/nginx Log: SSL: take into account data in the buffer while limiting output. In some rare cases this can result in a more smooth sending rate. Modified: trunk

[nginx] svn commit: r5077 - in trunk/src: core http/modules/perl

2013-02-19 Thread vbart
Author: vbart Date: 2013-02-19 17:45:12 + (Tue, 19 Feb 2013) New Revision: 5077 URL: http://trac.nginx.org/nginx/changeset/5077/nginx Log: Version bump. Modified: trunk/src/core/nginx.h trunk/src/http/modules/perl/nginx.pm Modified: trunk/src/core/nginx.h

[nginx] svn commit: r5078 - in trunk/src/http: . modules

2013-02-19 Thread vbart
Author: vbart Date: 2013-02-19 17:48:45 + (Tue, 19 Feb 2013) New Revision: 5078 URL: http://trac.nginx.org/nginx/changeset/5078/nginx Log: Removed zero termination of shm zone names. It was added in r2717 and no longer needed since r2721, where the termination was added to ngx_shm_alloc

[nginx] svn commit: r5083 - trunk/src/http

2013-02-23 Thread vbart
Author: vbart Date: 2013-02-23 13:23:48 + (Sat, 23 Feb 2013) New Revision: 5083 URL: http://trac.nginx.org/nginx/changeset/5083/nginx Log: Fixed potential segfault in ngx_http_keepalive_handler(). In case of error in the read event handling we close a connection by calling

[nginx] svn commit: r5086 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 16:53:01 + (Wed, 27 Feb 2013) New Revision: 5086 URL: http://trac.nginx.org/nginx/changeset/5086/nginx Log: The default server lookup is now done only once per connection. Previously, it was done for every request in a connection. Modified: trunk/src/http

[nginx] svn commit: r5087 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 16:56:47 + (Wed, 27 Feb 2013) New Revision: 5087 URL: http://trac.nginx.org/nginx/changeset/5087/nginx Log: Introduced the ngx_http_set_connection_log() macro. No functional changes. Modified: trunk/src/http/ngx_http_core_module.c trunk/src/http

[nginx] svn commit: r5088 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:03:14 + (Wed, 27 Feb 2013) New Revision: 5088 URL: http://trac.nginx.org/nginx/changeset/5088/nginx Log: Changed interface of ngx_http_validate_host(). Modified: trunk/src/http/ngx_http_request.c Modified: trunk/src/http/ngx_http_request.c

[nginx] svn commit: r5089 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:06:52 + (Wed, 27 Feb 2013) New Revision: 5089 URL: http://trac.nginx.org/nginx/changeset/5089/nginx Log: SNI: ignore captures in server_name regexes when matching by SNI. This change helps to decouple ngx_http_ssl_servername() from the request object. Note

[nginx] svn commit: r5090 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:12:48 + (Wed, 27 Feb 2013) New Revision: 5090 URL: http://trac.nginx.org/nginx/changeset/5090/nginx Log: SNI: reuse selected configuration for all requests in a connection. Previously, only the first request in a connection was assigned the configuration

[nginx] svn commit: r5091 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:16:51 + (Wed, 27 Feb 2013) New Revision: 5091 URL: http://trac.nginx.org/nginx/changeset/5091/nginx Log: Status: do not count connection as reading right after accept(). Before we receive the first bytes, the connection is counted as waiting. This change

[nginx] svn commit: r5092 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:21:21 + (Wed, 27 Feb 2013) New Revision: 5092 URL: http://trac.nginx.org/nginx/changeset/5092/nginx Log: SSL: do not treat SSL handshake as request. The request object will not be created until SSL handshake is complete. This simplifies adding another

[nginx] svn commit: r5093 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:27:15 + (Wed, 27 Feb 2013) New Revision: 5093 URL: http://trac.nginx.org/nginx/changeset/5093/nginx Log: Apply server configuration as soon as host is known. Previously, this was done only after the whole request header was parsed, and if an error occurred

[nginx] svn commit: r5094 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:33:59 + (Wed, 27 Feb 2013) New Revision: 5094 URL: http://trac.nginx.org/nginx/changeset/5094/nginx Log: SNI: avoid surplus lookup of virtual server if SNI was used. Modified: trunk/src/http/ngx_http_request.c trunk/src/http/ngx_http_request.h

[nginx] svn commit: r5095 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:38:54 + (Wed, 27 Feb 2013) New Revision: 5095 URL: http://trac.nginx.org/nginx/changeset/5095/nginx Log: SNI: reset to default server if requested host was not found. Not only this is consistent with a case without SNI, but this also prevents abusing

[nginx] svn commit: r5096 - trunk/src/http

2013-02-27 Thread vbart
Author: vbart Date: 2013-02-27 17:41:34 + (Wed, 27 Feb 2013) New Revision: 5096 URL: http://trac.nginx.org/nginx/changeset/5096/nginx Log: SNI: added restriction on requesting host other than negotiated. According to RFC 6066, client is not supposed to request a different server name at the

[nginx] svn commit: r5097 - trunk/src/http

2013-03-01 Thread vbart
Author: vbart Date: 2013-03-01 14:55:42 + (Fri, 01 Mar 2013) New Revision: 5097 URL: http://trac.nginx.org/nginx/changeset/5097/nginx Log: Allocate request object from its own pool. Previously, it was allocated from a connection pool and was selectively freed for an idle keepalive connection

[nginx] svn commit: r5101 - in trunk/src: core http/modules/perl

2013-03-07 Thread vbart
Author: vbart Date: 2013-03-07 17:07:04 + (Thu, 07 Mar 2013) New Revision: 5101 URL: http://trac.nginx.org/nginx/changeset/5101/nginx Log: Version bump. Modified: trunk/src/core/nginx.h trunk/src/http/modules/perl/nginx.pm Modified: trunk/src/core/nginx.h

[nginx] svn commit: r5102 - trunk/src/http

2013-03-07 Thread vbart
Author: vbart Date: 2013-03-07 17:21:50 + (Thu, 07 Mar 2013) New Revision: 5102 URL: http://trac.nginx.org/nginx/changeset/5102/nginx Log: Create request object only after the first byte was received. Previously, we always created an object and logged 400 (Bad Request) in access log if a

[nginx] svn commit: r5103 - trunk/src/http

2013-03-07 Thread vbart
Author: vbart Date: 2013-03-07 17:41:40 + (Thu, 07 Mar 2013) New Revision: 5103 URL: http://trac.nginx.org/nginx/changeset/5103/nginx Log: Use "client_header_timeout" for all requests in a connection. Previously, only the first request in a connection used timeout valu

[nginx] svn commit: r5104 - trunk/src/http

2013-03-07 Thread vbart
Author: vbart Date: 2013-03-07 17:59:27 + (Thu, 07 Mar 2013) New Revision: 5104 URL: http://trac.nginx.org/nginx/changeset/5104/nginx Log: Respect the new behavior of TCP_DEFER_ACCEPT. In Linux 2.6.32, TCP_DEFER_ACCEPT was changed to accept connections after the deferring period is finished

[nginx] svn commit: r5105 - in trunk/src: core http

2013-03-07 Thread vbart
Author: vbart Date: 2013-03-07 18:07:16 + (Thu, 07 Mar 2013) New Revision: 5105 URL: http://trac.nginx.org/nginx/changeset/5105/nginx Log: Removed c->single_connection flag. The c->single_connection was intended to be used as lock mechanism to serialize modifications of request objec

[nginx] svn commit: r5106 - trunk/src/http

2013-03-07 Thread vbart
Author: vbart Date: 2013-03-07 18:14:27 + (Thu, 07 Mar 2013) New Revision: 5106 URL: http://trac.nginx.org/nginx/changeset/5106/nginx Log: Refactored ngx_http_init_request(). Now it can be used as the request object factory with minimal impact on the connection object. Therefore it was

[nginx] svn commit: r5107 - trunk/src/http/modules

2013-03-07 Thread vbart
Author: vbart Date: 2013-03-07 18:21:28 + (Thu, 07 Mar 2013) New Revision: 5107 URL: http://trac.nginx.org/nginx/changeset/5107/nginx Log: SSL: Next Protocol Negotiation extension support. Not only this is useful for the upcoming SPDY support, but it can also help to improve HTTPS

[nginx] svn commit: r5108 - trunk/src/http/modules

2013-03-11 Thread vbart
Author: vbart Date: 2013-03-11 11:19:58 + (Mon, 11 Mar 2013) New Revision: 5108 URL: http://trac.nginx.org/nginx/changeset/5108/nginx Log: Gzip: fixed setting of NGX_HTTP_GZIP_BUFFERED. In r2411 setting of NGX_HTTP_GZIP_BUFFERED in c->buffered was moved f

[nginx] svn commit: r5109 - trunk/src/http

2013-03-11 Thread vbart
Author: vbart Date: 2013-03-11 14:44:56 + (Mon, 11 Mar 2013) New Revision: 5109 URL: http://trac.nginx.org/nginx/changeset/5109/nginx Log: Removed unused prototype of ngx_http_find_server_conf(). This function prototype and its implementation was added in r90, but the implementation was

[nginx] svn commit: r5115 - trunk/src/http

2013-03-15 Thread vbart
Author: vbart Date: 2013-03-15 19:49:54 + (Fri, 15 Mar 2013) New Revision: 5115 URL: http://trac.nginx.org/nginx/changeset/5115/nginx Log: Allow to reuse connections that wait their first request. This should improve behavior under deficiency of connections. Since SSL handshake usually

[nginx] svn commit: r5116 - in trunk/src: core event http/modules

2013-03-15 Thread vbart
Author: vbart Date: 2013-03-15 20:00:49 + (Fri, 15 Mar 2013) New Revision: 5116 URL: http://trac.nginx.org/nginx/changeset/5116/nginx Log: Status: introduced the "ngx_stat_waiting" counter. And corresponding variable $connections_waiting was added. Previously, waiting connec

[nginx] svn commit: r5120 - trunk/src/http

2013-03-20 Thread vbart
Author: vbart Date: 2013-03-20 09:36:27 + (Wed, 20 Mar 2013) New Revision: 5120 URL: http://trac.nginx.org/nginx/changeset/5120/nginx Log: URI processing code moved to a separate function. This allows to reuse it in the upcoming SPDY module. Modified: trunk/src/http/ngx_http_request.c

[nginx] svn commit: r5121 - trunk/src/os/win32

2013-03-20 Thread vbart
Author: vbart Date: 2013-03-20 10:18:26 + (Wed, 20 Mar 2013) New Revision: 5121 URL: http://trac.nginx.org/nginx/changeset/5121/nginx Log: Win32: disabled MSVC warning about '\0' not fitting into array. We believe that this warning produces more inconvience than real benefit.

[nginx] svn commit: r5138 - in trunk/src: core os/unix

2013-03-25 Thread vbart
Author: vbart Date: 2013-03-25 15:49:11 + (Mon, 25 Mar 2013) New Revision: 5138 URL: http://trac.nginx.org/nginx/changeset/5138/nginx Log: Use NGX_FILE_ERROR for handling file operations errors. On Win32 platforms 0 is used to indicate errors in file operations, so comparing against -1 is

[nginx] svn commit: r5167 - trunk/src/http/modules

2013-04-03 Thread vbart
Author: vbart Date: 2013-04-03 14:13:35 + (Wed, 03 Apr 2013) New Revision: 5167 URL: http://trac.nginx.org/nginx/changeset/5167/nginx Log: Limit req: rate should be non-zero. Specifying zero rate caused division by zero when calculating delays. Modified: trunk/src/http/modules

[nginx] svn commit: r5168 - trunk/src/http

2013-04-04 Thread vbart
Author: vbart Date: 2013-04-04 14:19:06 + (Thu, 04 Apr 2013) New Revision: 5168 URL: http://trac.nginx.org/nginx/changeset/5168/nginx Log: Upstream: removed surplus ngx_resolve_name_done() call. It will be called in ngx_http_upstream_finalize_request(). Modified: trunk/src/http

[nginx] svn commit: r5171 - trunk/src/event/modules

2013-04-12 Thread vbart
Author: vbart Date: 2013-04-12 15:02:33 + (Fri, 12 Apr 2013) New Revision: 5171 URL: http://trac.nginx.org/nginx/changeset/5171/nginx Log: Events: protection from stale events in eventport and devpoll. Stale write event may happen if read and write events was reported both, and processing of

[nginx] svn commit: r5172 - trunk/src/event/modules

2013-04-12 Thread vbart
Author: vbart Date: 2013-04-12 15:04:23 + (Fri, 12 Apr 2013) New Revision: 5172 URL: http://trac.nginx.org/nginx/changeset/5172/nginx Log: Events: handle only active events in eventport. We generate both read and write events if an error event was returned by port_getn() without POLLIN

[nginx] svn commit: r5173 - trunk/src/event/modules

2013-04-12 Thread vbart
Author: vbart Date: 2013-04-12 17:31:08 + (Fri, 12 Apr 2013) New Revision: 5173 URL: http://trac.nginx.org/nginx/changeset/5173/nginx Log: Events: fixed typos in two previous commits. Modified: trunk/src/event/modules/ngx_devpoll_module.c trunk/src/event/modules/ngx_eventport_module.c

[nginx] svn commit: r5183 - trunk/src/http

2013-04-23 Thread vbart
Author: vbart Date: 2013-04-23 10:15:49 + (Tue, 23 Apr 2013) New Revision: 5183 URL: http://trac.nginx.org/nginx/changeset/5183/nginx Log: SPDY: set NGX_TCP_NODELAY_DISABLED for fake connections. This is to avoid setting the TCP_NODELAY flag on SPDY socket in ngx_http_upstream_send_response