# HG changeset patch # User Igor Sysoev # Date 1133801945 0 # Node ID 401de5a43ba5a8acdb9c52465193c0ea7354afe7 # Parent 13f8ebdc82ef9a0119e85a48b2ab8b4c90aee09b nginx-0.3.14-RELEASE import *) Bugfix: in the 304 response the body was transferred; the bug had appeared in 0.3.13. diff --git a/docs/xml/nginx/changes.xml b/docs/xml/nginx/changes.xml --- a/docs/xml/nginx/changes.xml +++ b/docs/xml/nginx/changes.xml @@ -9,6 +9,22 @@ nginx changelog + + + + +в ответе 304 передавалось тело ответа; +ошибка появилась в 0.3.13. + + +in the 304 response the body was transferred; +bug appeared in 0.3.13. + + + + + + diff --git a/src/core/nginx.h b/src/core/nginx.h --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VER "nginx/0.3.13" +#define NGINX_VER "nginx/0.3.14" #define NGINX_VAR "NGINX" #define NGX_OLDPID_EXT ".oldbin" diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c --- a/src/http/modules/ngx_http_static_module.c +++ b/src/http/modules/ngx_http_static_module.c @@ -264,7 +264,7 @@ ngx_http_static_handler(ngx_http_request rc = ngx_http_send_header(r); - if (rc == NGX_ERROR || rc > NGX_OK) { + if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { return rc; } diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c --- a/src/os/unix/ngx_linux_sendfile_chain.c +++ b/src/os/unix/ngx_linux_sendfile_chain.c @@ -23,8 +23,8 @@ #define NGX_HEADERS 8 -ngx_chain_t *ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, - off_t limit) +ngx_chain_t * +ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) { int rc, tcp_nodelay; u_char *prev; diff --git a/src/os/unix/ngx_solaris_sendfilev_chain.c b/src/os/unix/ngx_solaris_sendfilev_chain.c --- a/src/os/unix/ngx_solaris_sendfilev_chain.c +++ b/src/os/unix/ngx_solaris_sendfilev_chain.c @@ -23,7 +23,7 @@ typedef struct sendfilevec { #define SFV_FD_SELF -2 static ssize_t sendfilev(int fd, const struct sendfilevec *vec, - int sfvcnt, size_t *xferred) + int sfvcnt, size_t *xferred) { return -1; } @@ -34,8 +34,8 @@ static ssize_t sendfilev(int fd, const s #define NGX_SENDFILEVECS 16 -ngx_chain_t *ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, - off_t limit) +ngx_chain_t * +ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) { int fd; u_char *prev;