Mercurial > hg > nginx
diff src/http/ngx_http_script.c @ 3633:187783310b65
return code text
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 18 Jun 2010 15:15:20 +0000 |
parents | dd1570b6f237 |
children | 55f95e91daed |
line wrap: on
line diff
--- a/src/http/ngx_http_script.c Fri Jun 18 15:08:44 2010 +0000 +++ b/src/http/ngx_http_script.c Fri Jun 18 15:15:20 2010 +0000 @@ -1254,14 +1254,17 @@ 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; }