aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_script.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-06-18 15:15:20 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-06-18 15:15:20 +0000
commit4c1b0770ca0944cbb81493333719284ea7d20b4b (patch)
tree4564bdce609fd955c32bc02aa3989d0a0c5de66b /src/http/ngx_http_script.c
parent01213e18a7a60d8e8baac41f0b1481ac8d6bfd43 (diff)
downloadnginx-4c1b0770ca0944cbb81493333719284ea7d20b4b.tar.gz
nginx-4c1b0770ca0944cbb81493333719284ea7d20b4b.zip
return code text
Diffstat (limited to 'src/http/ngx_http_script.c')
-rw-r--r--src/http/ngx_http_script.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index 5ccce003c..1f4288969 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -1254,14 +1254,17 @@ ngx_http_script_return_code(ngx_http_script_engine_t *e)
code = (ngx_http_script_return_code_t *) e->ip;
- e->status = code->status;
-
- if (code->status == NGX_HTTP_NO_CONTENT) {
- e->request->header_only = 1;
- e->request->zero_body = 1;
+ if (code->status < NGX_HTTP_BAD_REQUEST
+ || code->text.value.len
+ || code->text.lengths)
+ {
+ e->status = ngx_http_send_response(e->request, code->status, NULL,
+ &code->text);
+ } else {
+ e->status = code->status;
}
- e->ip += sizeof(ngx_http_script_return_code_t) - sizeof(uintptr_t);
+ e->ip = ngx_http_script_exit;
}