[-]
[+]
|
Changed |
nginx-1.2.changes
|
|
[-]
[+]
|
Changed |
nginx-1.2.spec
^
|
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/CHANGES
^
|
@@ -1,4 +1,21 @@
+Changes with nginx 1.2.8 02 Apr 2013
+
+ *) Bugfix: new sessions were not always stored if the "ssl_session_cache
+ shared" directive was used and there was no free space in shared
+ memory.
+ Thanks to Piotr Sikora.
+
+ *) Bugfix: responses might hang if subrequests were used and a DNS error
+ happened during subrequest processing.
+ Thanks to Lanshun Zhou.
+
+ *) Bugfix: in the ngx_http_mp4_module.
+ Thanks to Gernot Vormayr.
+
+ *) Bugfix: in backend usage accounting.
+
+
Changes with nginx 1.2.7 12 Feb 2013
*) Change: now if the "include" directive with mask is used on Unix
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/CHANGES.ru
^
|
@@ -1,4 +1,21 @@
+Изменения в nginx 1.2.8 02.04.2013
+
+ *) Исправление: при использовании директивы "ssl_session_cache shared"
+ новые сессии могли не сохраняться, если заканчивалось место в
+ разделяемой памяти.
+ Спасибо Piotr Sikora.
+
+ *) Исправление: ответы могли зависать, если использовались подзапросы и
+ при обработке подзапроса происходила DNS-ошибка.
+ Спасибо Lanshun Zhou.
+
+ *) Исправление: в модуле ngx_http_mp4_module.
+ Спасибо Gernot Vormayr.
+
+ *) Исправление: в процедуре учёта использования бэкендов.
+
+
Изменения в nginx 1.2.7 12.02.2013
*) Изменение: теперь при использовании директивы include с маской на
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/auto/lib/perl/make
^
|
@@ -6,11 +6,12 @@
cat << END >> $NGX_MAKEFILE
$NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.so: \
+ \$(CORE_DEPS) \$(HTTP_DEPS) \
src/http/modules/perl/nginx.pm \
src/http/modules/perl/nginx.xs \
src/http/modules/perl/ngx_http_perl_module.h \
$NGX_OBJS/src/http/modules/perl/Makefile
- cp -p src/http/modules/perl/nginx.* $NGX_OBJS/src/http/modules/perl/
+ cp src/http/modules/perl/nginx.* $NGX_OBJS/src/http/modules/perl/
cd $NGX_OBJS/src/http/modules/perl && \$(MAKE)
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/core/nginx.c
^
|
@@ -594,6 +594,10 @@
var = ngx_alloc(sizeof(NGINX_VAR)
+ cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2,
cycle->log);
+ if (var == NULL) {
+ ngx_free(env);
+ return NGX_INVALID_PID;
+ }
p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR));
@@ -633,7 +637,7 @@
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
- if (ngx_rename_file(ccf->pid.data, ccf->oldpid.data) != NGX_OK) {
+ if (ngx_rename_file(ccf->pid.data, ccf->oldpid.data) == NGX_FILE_ERROR) {
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
ngx_rename_file_n " %s to %s failed "
"before executing new binary process \"%s\"",
@@ -648,7 +652,9 @@
pid = ngx_execute(cycle, &ctx);
if (pid == NGX_INVALID_PID) {
- if (ngx_rename_file(ccf->oldpid.data, ccf->pid.data) != NGX_OK) {
+ if (ngx_rename_file(ccf->oldpid.data, ccf->pid.data)
+ == NGX_FILE_ERROR)
+ {
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
ngx_rename_file_n " %s back to %s failed after "
"an attempt to execute new binary process \"%s\"",
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/core/nginx.h
^
|
@@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 1002007
-#define NGINX_VERSION "1.2.7"
+#define nginx_version 1002008
+#define NGINX_VERSION "1.2.8"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/core/ngx_conf_file.c
^
|
@@ -133,7 +133,7 @@
cf->conf_file = &conf_file;
- if (ngx_fd_info(fd, &cf->conf_file->file.info) == -1) {
+ if (ngx_fd_info(fd, &cf->conf_file->file.info) == NGX_FILE_ERROR) {
ngx_log_error(NGX_LOG_EMERG, cf->log, ngx_errno,
ngx_fd_info_n " \"%s\" failed", filename->data);
}
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/core/ngx_connection.c
^
|
@@ -412,7 +412,7 @@
}
if (ngx_test_config) {
- if (ngx_delete_file(name) == -1) {
+ if (ngx_delete_file(name) == NGX_FILE_ERROR) {
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
ngx_delete_file_n " %s failed", name);
}
@@ -739,7 +739,7 @@
{
u_char *name = ls[i].addr_text.data + sizeof("unix:") - 1;
- if (ngx_delete_file(name) == -1) {
+ if (ngx_delete_file(name) == NGX_FILE_ERROR) {
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
ngx_delete_file_n " %s failed", name);
}
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/core/ngx_cycle.c
^
|
@@ -679,7 +679,7 @@
ngx_log_error(NGX_LOG_WARN, cycle->log, 0,
"deleting socket %s", name);
- if (ngx_delete_file(name) == -1) {
+ if (ngx_delete_file(name) == NGX_FILE_ERROR) {
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno,
ngx_delete_file_n " %s failed", name);
}
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/event/ngx_event_openssl.c
^
|
@@ -1716,8 +1716,18 @@
}
sess_id = ngx_slab_alloc_locked(shpool, sizeof(ngx_ssl_sess_id_t));
+
if (sess_id == NULL) {
- goto failed;
+
+ /* drop the oldest non-expired session and try once more */
+
+ ngx_ssl_expire_sessions(cache, shpool, 0);
+
+ sess_id = ngx_slab_alloc_locked(shpool, sizeof(ngx_ssl_sess_id_t));
+
+ if (sess_id == NULL) {
+ goto failed;
+ }
}
#if (NGX_PTR_SIZE == 8)
@@ -1727,8 +1737,18 @@
#else
id = ngx_slab_alloc_locked(shpool, sess->session_id_length);
+
if (id == NULL) {
- goto failed;
+
+ /* drop the oldest non-expired session and try once more */
+
+ ngx_ssl_expire_sessions(cache, shpool, 0);
+
+ id = ngx_slab_alloc_locked(shpool, sess->session_id_length);
+
+ if (id == NULL) {
+ goto failed;
+ }
}
#endif
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/modules/ngx_http_autoindex_module.c
^
|
@@ -489,8 +489,11 @@
}
b->last = ngx_cpymem(b->last, "</a>", sizeof("</a>") - 1);
- ngx_memset(b->last, ' ', NGX_HTTP_AUTOINDEX_NAME_LEN - len);
- b->last += NGX_HTTP_AUTOINDEX_NAME_LEN - len;
+
+ if (NGX_HTTP_AUTOINDEX_NAME_LEN - len > 0) {
+ ngx_memset(b->last, ' ', NGX_HTTP_AUTOINDEX_NAME_LEN - len);
+ b->last += NGX_HTTP_AUTOINDEX_NAME_LEN - len;
+ }
}
*b->last++ = ' ';
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/modules/ngx_http_index_module.c
^
|
@@ -85,12 +85,12 @@
/*
* Try to open/test the first index file before the test of directory
- * existence because valid requests should be much more than invalid ones.
- * If the file open()/stat() would fail, then the directory stat() should
- * be more quickly because some data is already cached in the kernel.
+ * existence because valid requests should prevail over invalid ones.
+ * If open()/stat() of a file will fail then stat() of a directory
+ * should be faster because kernel may have already cached some data.
* Besides, Win32 may return ERROR_PATH_NOT_FOUND (NGX_ENOTDIR) at once.
- * Unix has ENOTDIR error, however, it's less helpful than Win32's one:
- * it only indicates that path contains an usual file in place of directory.
+ * Unix has ENOTDIR error; however, it's less helpful than Win32's one:
+ * it only indicates that path points to a regular file, not a directory.
*/
static ngx_int_t
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/modules/ngx_http_mp4_module.c
^
|
@@ -750,6 +750,13 @@
*prev = &mp4->mdat_atom;
+ if (start_offset > mp4->mdat_data.buf->file_last) {
+ ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
+ "start time is out mp4 mdat atom in \"%s\"",
+ mp4->file.name.data);
+ return NGX_ERROR;
+ }
+
adjustment = mp4->ftyp_size + mp4->moov_size
+ ngx_http_mp4_update_mdat_atom(mp4, start_offset)
- start_offset;
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/modules/ngx_http_split_clients_module.c
^
|
@@ -218,7 +218,7 @@
part->percent = 0;
} else {
- if (value[0].data[value[0].len - 1] != '%') {
+ if (value[0].len == 0 || value[0].data[value[0].len - 1] != '%') {
goto invalid;
}
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/modules/ngx_http_ssl_module.c
^
|
@@ -593,7 +593,6 @@
for (j = sizeof("shared:") - 1; j < value[i].len; j++) {
if (value[i].data[j] == ':') {
- value[i].data[j] = '\0';
break;
}
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/modules/ngx_http_upstream_keepalive_module.c
^
|
@@ -37,8 +37,6 @@
ngx_event_save_peer_session_pt original_save_session;
#endif
- ngx_uint_t failed; /* unsigned:1 */
-
} ngx_http_upstream_keepalive_peer_data_t;
@@ -220,8 +218,6 @@
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0,
"get keepalive peer");
- kp->failed = 0;
-
/* ask balancer */
rc = kp->original_get_peer(pc, kp->data);
@@ -282,18 +278,12 @@
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, pc->log, 0,
"free keepalive peer");
- /* remember failed state - peer.free() may be called more than once */
-
- if (state & NGX_PEER_FAILED) {
- kp->failed = 1;
- }
-
/* cache valid connections */
u = kp->upstream;
c = pc->connection;
- if (kp->failed
+ if (state & NGX_PEER_FAILED
|| c == NULL
|| c->read->eof
|| c->read->error
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/modules/ngx_http_upstream_least_conn_module.c
^
|
@@ -353,10 +353,6 @@
return;
}
- if (state == 0 && pc->tries == 0) {
- return;
- }
-
lcp->conns[lcp->rrp.current]--;
lcp->free_rr_peer(pc, &lcp->rrp, state);
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/modules/perl/nginx.pm
^
|
@@ -50,7 +50,7 @@
HTTP_INSUFFICIENT_STORAGE
);
-our $VERSION = '1.2.7';
+our $VERSION = '1.2.8';
require XSLoader;
XSLoader::load('nginx', $VERSION);
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/ngx_http.h
^
|
@@ -94,7 +94,6 @@
ngx_str_t *args);
-ngx_int_t ngx_http_find_server_conf(ngx_http_request_t *r);
void ngx_http_update_location_config(ngx_http_request_t *r);
void ngx_http_handler(ngx_http_request_t *r);
void ngx_http_run_posted_requests(ngx_connection_t *c);
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/ngx_http_file_cache.c
^
|
@@ -1674,8 +1674,6 @@
p = (u_char *) ngx_strchr(name.data, ':');
if (p) {
- *p = '\0';
-
name.len = p - name.data;
p++;
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/ngx_http_request.c
^
|
@@ -2743,6 +2743,7 @@
if (n == NGX_AGAIN) {
if (ngx_handle_read_event(rev, 0) != NGX_OK) {
ngx_http_close_connection(c);
+ return;
}
/*
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/ngx_http_upstream.c
^
|
@@ -865,11 +865,13 @@
static void
ngx_http_upstream_resolve_handler(ngx_resolver_ctx_t *ctx)
{
+ ngx_connection_t *c;
ngx_http_request_t *r;
ngx_http_upstream_t *u;
ngx_http_upstream_resolved_t *ur;
r = ctx->data;
+ c = r->connection;
u = r->upstream;
ur = u->resolved;
@@ -881,7 +883,7 @@
ngx_resolver_strerror(ctx->state));
ngx_http_upstream_finalize_request(r, u, NGX_HTTP_BAD_GATEWAY);
- return;
+ goto failed;
}
ur->naddrs = ctx->naddrs;
@@ -906,13 +908,17 @@
if (ngx_http_upstream_create_round_robin_peer(r, ur) != NGX_OK) {
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_INTERNAL_SERVER_ERROR);
- return;
+ goto failed;
}
ngx_resolve_name_done(ctx);
ur->ctx = NULL;
ngx_http_upstream_connect(r, u);
+
+failed:
+
+ ngx_http_run_posted_requests(c);
}
@@ -2840,14 +2846,16 @@
ngx_http_busy_unlock(u->conf->busy_lock, &u->busy_lock);
#endif
- if (ft_type == NGX_HTTP_UPSTREAM_FT_HTTP_404) {
- state = NGX_PEER_NEXT;
- } else {
- state = NGX_PEER_FAILED;
- }
+ if (u->peer.sockaddr) {
+
+ if (ft_type == NGX_HTTP_UPSTREAM_FT_HTTP_404) {
+ state = NGX_PEER_NEXT;
+ } else {
+ state = NGX_PEER_FAILED;
+ }
- if (ft_type != NGX_HTTP_UPSTREAM_FT_NOLIVE) {
u->peer.free(&u->peer, u->peer.data, state);
+ u->peer.sockaddr = NULL;
}
if (ft_type == NGX_HTTP_UPSTREAM_FT_TIMEOUT) {
@@ -3007,8 +3015,9 @@
u->finalize_request(r, rc);
- if (u->peer.free) {
+ if (u->peer.free && u->peer.sockaddr) {
u->peer.free(&u->peer, u->peer.data, 0);
+ u->peer.sockaddr = NULL;
}
if (u->peer.connection) {
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/ngx_http_upstream_round_robin.c
^
|
@@ -584,10 +584,6 @@
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0,
"free rr peer %ui %ui", pc->tries, state);
- if (state == 0 && pc->tries == 0) {
- return;
- }
-
/* TODO: NGX_PEER_KEEPALIVE */
if (rrp->peers->single) {
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/http/ngx_http_variables.h
^
|
@@ -57,9 +57,6 @@
ngx_str_t *var, ngx_list_part_t *part, size_t prefix);
-#define ngx_http_clear_variable(r, index) r->variables0[index].text.data = NULL;
-
-
#if (NGX_PCRE)
typedef struct {
|
[-]
[+]
|
Changed |
nginx-1.2.8.tar.bz2/src/os/unix/ngx_process_cycle.c
^
|
@@ -647,7 +647,7 @@
if (ngx_rename_file((char *) ccf->oldpid.data,
(char *) ccf->pid.data)
- != NGX_OK)
+ == NGX_FILE_ERROR)
{
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
ngx_rename_file_n " %s back to %s failed "
|