mirror of
https://github.com/nginx/nginx.git
synced 2025-01-02 12:17:40 -06:00
nginx-0.3.59-RELEASE import
*) Feature: now is possible to do several redirection using the "error_page" directive. *) Bugfix: the "dav_access" directive did not support three parameters. *) Bugfix: the "error_page" directive did not changes the "Content-Type" header line after the "X-Accel-Redirect" was used; the bug had appeared in 0.3.58.
This commit is contained in:
parent
2fb72a2205
commit
ef31643049
@ -4,16 +4,16 @@
|
||||
|
||||
CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN
|
||||
|
||||
!if "$(MD5_ASM)" == "YES"
|
||||
!IF "$(MD5_ASM)" == "YES"
|
||||
|
||||
md5.lib:
|
||||
cl -c $(CFLAGS) -D MD5_ASM md5_dgst.c
|
||||
link -lib -out:md5.lib md5_dgst.obj asm/m-win32.obj
|
||||
|
||||
!else
|
||||
!ELSE
|
||||
|
||||
md5.lib:
|
||||
cl -c $(CFLAGS) md5_dgst.c
|
||||
link -lib -out:md5.lib md5_dgst.obj
|
||||
|
||||
!endif
|
||||
!ENDIF
|
||||
|
@ -4,16 +4,16 @@
|
||||
|
||||
CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN
|
||||
|
||||
!if "$(SHA1_ASM)" == "YES"
|
||||
!IF "$(SHA1_ASM)" == "YES"
|
||||
|
||||
sha1.lib:
|
||||
cl -c $(CFLAGS) -D SHA1_ASM sha1dgst.c
|
||||
link -lib -out:sha1.lib sha1dgst.obj asm/s-win32.obj
|
||||
|
||||
!else
|
||||
!ELSE
|
||||
|
||||
sha1.lib:
|
||||
cl -c $(CFLAGS) sha1dgst.c
|
||||
link -lib -out:sha1.lib sha1dgst.obj
|
||||
|
||||
!endif
|
||||
!ENDIF
|
||||
|
@ -9,6 +9,42 @@
|
||||
<title lang="en">nginx changelog</title>
|
||||
|
||||
|
||||
<changes ver="0.3.59" date="16.08.2006">
|
||||
|
||||
<change type="feature">
|
||||
<para lang="ru">
|
||||
ÔÅÐÅÒØ ÍÏÖÎÏ ÄÅÌÁÔØ ÎÅÓËÏÌØËÏ ÐÅÒÅÎÁÐÒÁ×ÌÅÎÉÊ ÞÅÒÅÚ ÄÉÒÅËÔÉ×Õ error_page.
|
||||
</para>
|
||||
<para lang="en">
|
||||
now is possible to do several redirection using the "error_page" directive.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÄÉÒÅËÔÉ×Á dav_access ÎÅ ÐÏÄÄÅÒÖÉ×ÁÌÁ ÔÒÉ ÐÁÒÁÍÅÔÒÁ.
|
||||
</para>
|
||||
<para lang="en">
|
||||
the "dav_access" directive did not support three parameters.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
<change type="bugfix">
|
||||
<para lang="ru">
|
||||
ÄÉÒÅËÔÉ×Á error_page ÎÅ ÉÚÍÅÎÑÌÁ ÓÔÒÏËÕ "Content-Type"
|
||||
ÐÏÓÌÅ ÐÅÒÅÎÁÐÒÁ×ÌÅÎÉÑ Ó ÐÏÍÏÝØÀ "X-Accel-Redirect";
|
||||
ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.3.58.
|
||||
</para>
|
||||
<para lang="en">
|
||||
the "error_page" directive did not changes the "Content-Type" header line
|
||||
after the "X-Accel-Redirect" was used;
|
||||
bug appeared in 0.3.58.
|
||||
</para>
|
||||
</change>
|
||||
|
||||
</changes>
|
||||
|
||||
|
||||
<changes ver="0.3.58" date="14.08.2006">
|
||||
|
||||
<change type="feature">
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define _NGINX_H_INCLUDED_
|
||||
|
||||
|
||||
#define NGINX_VER "nginx/0.3.58"
|
||||
#define NGINX_VER "nginx/0.3.59"
|
||||
|
||||
#define NGINX_VAR "NGINX"
|
||||
#define NGX_OLDPID_EXT ".oldbin"
|
||||
|
@ -57,7 +57,7 @@ static ngx_command_t ngx_http_dav_commands[] = {
|
||||
NULL },
|
||||
|
||||
{ ngx_string("dav_access"),
|
||||
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE12,
|
||||
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE123,
|
||||
ngx_http_dav_access,
|
||||
NGX_HTTP_LOC_CONF_OFFSET,
|
||||
0,
|
||||
|
@ -526,7 +526,7 @@ ngx_http_memcached_create_loc_conf(ngx_conf_t *cf)
|
||||
conf->upstream.max_temp_file_size = 0;
|
||||
conf->upstream.temp_file_write_size = 0;
|
||||
conf->upstream.intercept_errors = 1;
|
||||
conf->upstream.redirect_404 = 1;
|
||||
conf->upstream.intercept_404 = 1;
|
||||
conf->upstream.pass_request_headers = 0;
|
||||
conf->upstream.pass_request_body = 0;
|
||||
|
||||
|
@ -53,12 +53,8 @@ struct ngx_http_log_ctx_s {
|
||||
};
|
||||
|
||||
|
||||
#define ngx_http_get_module_ctx(r, module) (r)->ctx[module.ctx_index]
|
||||
#define ngx_http_get_module_err_ctx(r, module) \
|
||||
((r)->err_ctx ? (r)->err_ctx[module.ctx_index] : (r)->ctx[module.ctx_index])
|
||||
|
||||
#define ngx_http_set_ctx(r, c, module) r->ctx[module.ctx_index] = c;
|
||||
#define ngx_http_delete_ctx(r, module) r->ctx[module.ctx_index] = NULL;
|
||||
#define ngx_http_get_module_ctx(r, module) (r)->ctx[module.ctx_index]
|
||||
#define ngx_http_set_ctx(r, c, module) r->ctx[module.ctx_index] = c;
|
||||
|
||||
|
||||
void ngx_http_init_connection(ngx_connection_t *c);
|
||||
|
@ -464,7 +464,7 @@ ngx_http_handler(ngx_http_request_t *r)
|
||||
|
||||
r->connection->unexpected_eof = 0;
|
||||
|
||||
if (r->err_ctx == NULL) {
|
||||
if (!r->internal) {
|
||||
switch (r->headers_in.connection_type) {
|
||||
case 0:
|
||||
if (r->http_version > NGX_HTTP_VERSION_10) {
|
||||
@ -1341,21 +1341,8 @@ ngx_http_internal_redirect(ngx_http_request_t *r,
|
||||
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||
}
|
||||
|
||||
if (r->err_ctx) {
|
||||
|
||||
/* allocate the new module's contexts */
|
||||
|
||||
r->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module);
|
||||
if (r->ctx == NULL) {
|
||||
return NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/* clear the modules contexts */
|
||||
|
||||
ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);
|
||||
}
|
||||
/* clear the modules contexts */
|
||||
ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);
|
||||
|
||||
cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
|
||||
r->loc_conf = cscf->ctx->loc_conf;
|
||||
|
@ -424,6 +424,9 @@ ngx_http_init_request(ngx_event_t *rev)
|
||||
r->headers_out.content_length_n = -1;
|
||||
r->headers_out.last_modified_time = -1;
|
||||
|
||||
r->uri_changes = NGX_HTTP_MAX_URI_CHANGES + 1;
|
||||
r->subrequests = NGX_HTTP_MAX_SUBREQUESTS + 1;
|
||||
|
||||
r->http_state = NGX_HTTP_READING_REQUEST_STATE;
|
||||
|
||||
ctx = c->log->data;
|
||||
@ -667,9 +670,6 @@ ngx_http_process_request_line(ngx_event_t *rev)
|
||||
c->write->handler = ngx_http_request_handler;
|
||||
r->read_event_handler = ngx_http_block_read;
|
||||
|
||||
r->uri_changes = NGX_HTTP_MAX_URI_CHANGES + 1;
|
||||
r->subrequests = NGX_HTTP_MAX_SUBREQUESTS + 1;
|
||||
|
||||
ngx_http_handler(r);
|
||||
|
||||
return;
|
||||
|
@ -368,7 +368,6 @@ struct ngx_http_request_s {
|
||||
|
||||
off_t request_length;
|
||||
|
||||
void **err_ctx;
|
||||
ngx_uint_t err_status;
|
||||
|
||||
ngx_http_connection_t *http_connection;
|
||||
|
@ -336,9 +336,11 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
|
||||
}
|
||||
}
|
||||
|
||||
r->headers_out.content_type.len = 0;
|
||||
|
||||
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
|
||||
|
||||
if (r->err_ctx == NULL && clcf->error_pages) {
|
||||
if (clcf->error_pages) {
|
||||
|
||||
err_page = clcf->error_pages->elts;
|
||||
|
||||
@ -346,7 +348,6 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
|
||||
|
||||
if (err_page[i].status == error) {
|
||||
r->err_status = err_page[i].overwrite;
|
||||
r->err_ctx = r->ctx;
|
||||
|
||||
r->method = NGX_HTTP_GET;
|
||||
|
||||
@ -370,9 +371,10 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
|
||||
ngx_list_push(&r->headers_out.headers);
|
||||
|
||||
if (r->headers_out.location) {
|
||||
r->err_status = NGX_HTTP_MOVED_TEMPORARILY;
|
||||
error = NGX_HTTP_MOVED_TEMPORARILY;
|
||||
|
||||
r->err_status = NGX_HTTP_MOVED_TEMPORARILY;
|
||||
|
||||
r->headers_out.location->hash = 1;
|
||||
r->headers_out.location->key.len = sizeof("Location") - 1;
|
||||
r->headers_out.location->key.data = (u_char *) "Location";
|
||||
|
@ -1093,17 +1093,15 @@ ngx_http_upstream_process_header(ngx_event_t *rev)
|
||||
return;
|
||||
}
|
||||
|
||||
if (u->conf->redirect_404) {
|
||||
rc = (r->err_ctx == NULL) ? 404 : 204;
|
||||
ngx_http_upstream_finalize_request(r, u, rc);
|
||||
if (u->conf->intercept_404) {
|
||||
ngx_http_upstream_finalize_request(r, u, NGX_HTTP_NOT_FOUND);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (u->headers_in.status_n >= NGX_HTTP_BAD_REQUEST
|
||||
&& u->conf->intercept_errors
|
||||
&& r->err_ctx == NULL)
|
||||
&& u->conf->intercept_errors)
|
||||
{
|
||||
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
|
||||
|
||||
|
@ -103,7 +103,7 @@ typedef struct {
|
||||
ngx_str_t location;
|
||||
ngx_str_t url; /* used in proxy_rewrite_location */
|
||||
|
||||
unsigned redirect_404:1;
|
||||
unsigned intercept_404:1;
|
||||
unsigned change_buffering:1;
|
||||
|
||||
#if (NGX_HTTP_SSL)
|
||||
|
Loading…
Reference in New Issue
Block a user