diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:56:37 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:56:37 +0000 |
| commit | 05b1a8f1e3595beab4397e25c2a6db9d832a6a97 (patch) | |
| tree | 282923e87cbaf9d634dab4a7c69ce85d602effcf /src/http/ngx_http_special_response.c | |
| parent | 328df7a5cc91180fef3b1b58129e14bc79bef80b (diff) | |
| download | nginx-05b1a8f1e3595beab4397e25c2a6db9d832a6a97.tar.gz nginx-05b1a8f1e3595beab4397e25c2a6db9d832a6a97.tar.bz2 | |
ngx_str_set() and ngx_str_null()
Diffstat (limited to 'src/http/ngx_http_special_response.c')
| -rw-r--r-- | src/http/ngx_http_special_response.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 060cc9934..5c032f3a5 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -553,8 +553,7 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page) r->err_status = NGX_HTTP_MOVED_TEMPORARILY; location->hash = 1; - location->key.len = sizeof("Location") - 1; - location->key.data = (u_char *) "Location"; + ngx_str_set(&location->key, "Location"); location->value = uri; r->headers_out.location = location; @@ -608,8 +607,7 @@ ngx_http_send_special_response(ngx_http_request_t *r, } r->headers_out.content_type_len = sizeof("text/html") - 1; - r->headers_out.content_type.len = sizeof("text/html") - 1; - r->headers_out.content_type.data = (u_char *) "text/html"; + ngx_str_set(&r->headers_out.content_type, "text/html"); r->headers_out.content_type_lowcase = NULL; } else { @@ -711,8 +709,7 @@ ngx_http_send_refresh(ngx_http_request_t *r) r->err_status = NGX_HTTP_OK; r->headers_out.content_type_len = sizeof("text/html") - 1; - r->headers_out.content_type.len = sizeof("text/html") - 1; - r->headers_out.content_type.data = (u_char *) "text/html"; + ngx_str_set(&r->headers_out.content_type, "text/html"); r->headers_out.content_type_lowcase = NULL; r->headers_out.location->hash = 0; |
