]> git.kaiwu.me - nginx.git/commitdiff
$r->status
authorIgor Sysoev <igor@sysoev.ru>
Wed, 13 Dec 2006 13:49:56 +0000 (13:49 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 13 Dec 2006 13:49:56 +0000 (13:49 +0000)
src/http/modules/perl/nginx.xs

index 06bc9435ed7773afcee1a6a3c48245a5837eaf4b..558922c38e7d8e51f1f08bf7f35996ea9b2ff094 100644 (file)
@@ -93,6 +93,22 @@ ngx_http_perl_output(ngx_http_request_t *r, ngx_buf_t *b)
 MODULE = nginx    PACKAGE = nginx
 
 
+void
+status(r, code)
+    CODE:
+
+    ngx_http_request_t  *r;
+
+    ngx_http_perl_set_request(r);
+
+    r->headers_out.status = SvIV(ST(1));
+
+    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+                   "perl status: %d", r->headers_out.status);
+
+    XSRETURN_UNDEF;
+
+
 void
 send_http_header(r, ...)
     CODE: