diff options
Diffstat (limited to 'src/http/modules/perl/nginx.xs')
| -rw-r--r-- | src/http/modules/perl/nginx.xs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index a32c85e73..734f7bac8 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -846,6 +846,27 @@ variable(r, name, value = NULL) void +sleep(r, sleep, next) + CODE: + + dXSTARG; + ngx_http_request_t *r; + ngx_http_perl_ctx_t *ctx; + + ngx_http_perl_set_request(r); + + ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module); + + ctx->sleep = SvIV(ST(1)); + ctx->next = SvRV(ST(2)); + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "perl sleep: %d", ctx->sleep); + + XSRETURN_EMPTY; + + +void log_error(r, err, msg) CODE: |
