summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_rewrite_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-11-11 14:07:14 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-11-11 14:07:14 +0000
commit1b73583ba2c0e4b72d951218827e0c621427d389 (patch)
tree9e4d204e2cce91560d5cb8908b8a1a9f2c1d92ee /src/http/modules/ngx_http_rewrite_handler.c
parentd6f24959428caed68a509a19ca4fd866d978a69c (diff)
downloadnginx-release-0.1.5.tar.gz
nginx-release-0.1.5.tar.bz2
nginx-0.1.5-RELEASE importrelease-0.1.5
*) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
Diffstat (limited to '')
-rw-r--r--src/http/modules/ngx_http_rewrite_handler.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/http/modules/ngx_http_rewrite_handler.c b/src/http/modules/ngx_http_rewrite_handler.c
index aa3a65648..0973ef087 100644
--- a/src/http/modules/ngx_http_rewrite_handler.c
+++ b/src/http/modules/ngx_http_rewrite_handler.c
@@ -146,8 +146,8 @@ static ngx_int_t ngx_http_rewrite_handler(ngx_http_request_t *r)
if (rc == NGX_DECLINED) {
if (scf->log) {
ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
- "\"%s\" does not match \"%s\"",
- rule[i].re_name.data, r->uri.data);
+ "\"%V\" does not match \"%V\"",
+ &rule[i].re_name, &r->uri);
}
continue;
@@ -156,15 +156,15 @@ static ngx_int_t ngx_http_rewrite_handler(ngx_http_request_t *r)
if (rc < 0) {
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
ngx_regex_exec_n
- " failed: %d on \"%s\" using \"%s\"",
- rc, r->uri.data, rule[i].re_name.data);
+ " failed: %d on \"%V\" using \"%V\"",
+ rc, &r->uri, &rule[i].re_name);
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
if (scf->log) {
ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
- "\"%s\" matches \"%s\"",
- rule[i].re_name.data, r->uri.data);
+ "\"%V\" matches \"%V\"",
+ &rule[i].re_name, &r->uri);
}
if (rule[i].status) {
@@ -177,7 +177,7 @@ static ngx_int_t ngx_http_rewrite_handler(ngx_http_request_t *r)
uri.len += matches[2 * n + 1] - matches[2 * n];
}
- if (!(uri.data = ngx_palloc(r->pool, uri.len + 1))) {
+ if (!(uri.data = ngx_palloc(r->pool, uri.len))) {
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
@@ -203,11 +203,9 @@ static ngx_int_t ngx_http_rewrite_handler(ngx_http_request_t *r)
}
}
- *p = '\0';
-
if (scf->log) {
ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
- "rewritten uri: \"%s\"", uri.data);
+ "rewritten uri: \"%V\"", &uri);
}
r->uri = uri;
@@ -353,7 +351,7 @@ static char *ngx_http_rewrite_rule(ngx_conf_t *cf, ngx_command_t *cmd,
}
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "invalid parameter \"%s\"", value[3].data);
+ "invalid parameter \"%V\"", &value[3]);
return NGX_CONF_ERROR;
}
@@ -427,7 +425,7 @@ static char *ngx_http_rewrite_rule(ngx_conf_t *cf, ngx_command_t *cmd,
} else {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "invalid parameter \"%s\"", value[3].data);
+ "invalid parameter \"%V\"", &value[3]);
return NGX_CONF_ERROR;
}
}