return ngx_http_next_header_filter(r);
}
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http js header filter");
+
rc = ngx_http_js_init_vm(r, ngx_http_js_request_proto_id);
if (rc == NGX_ERROR || rc == NGX_DECLINED) {
ctx->filter = 1;
pending = njs_vm_pending(ctx->vm);
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http js header call \"%V\"", &jlcf->header_filter);
+
rc = ngx_js_call(ctx->vm, &jlcf->header_filter, r->connection->log,
&ctx->request, 1);
return ngx_http_next_body_filter(r, in);
}
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http js body filter");
+
rc = ngx_http_js_init_vm(r, ngx_http_js_request_proto_id);
if (rc == NGX_ERROR || rc == NGX_DECLINED) {
pending = njs_vm_pending(ctx->vm);
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
+ "http js body call \"%V\"", &jlcf->body_filter);
+
rc = ngx_js_call(ctx->vm, &jlcf->body_filter, c->log, &arguments[0],
3);
return NGX_DECLINED;
}
+ ngx_log_debug0(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
+ "stream js phase handler");
+
rc = ngx_stream_js_init_vm(s, ngx_stream_js_session_proto_id);
if (rc != NGX_OK) {
return rc;
c = s->connection;
- ngx_log_debug1(NGX_LOG_DEBUG_STREAM, c->log, 0,
- "stream js phase call \"%V\"", name);
-
ctx = ngx_stream_get_module_ctx(s, ngx_stream_js_module);
if (!ctx->in_progress) {
ctx->status = NGX_ERROR;
+ ngx_log_debug1(NGX_LOG_DEBUG_STREAM, c->log, 0,
+ "stream js phase call \"%V\"", name);
+
rc = ngx_js_call(ctx->vm, name, c->log, &ctx->args[0], 1);
if (rc == NGX_ERROR) {
ctx = ngx_stream_get_module_ctx(s, ngx_stream_js_module);
if (!ctx->filter) {
+ ngx_log_debug1(NGX_LOG_DEBUG_STREAM, c->log, 0,
+ "stream js filter call \"%V\"" , &jscf->filter);
+
rc = ngx_js_call(ctx->vm, &jscf->filter, c->log, &ctx->args[0], 1);
if (rc == NGX_ERROR) {
if (c != NULL) {
ngx_log_error(NGX_LOG_ERR, c->log, 0,
- "js periodic \"%V\" is already running, killing previous "
- "instance", &periodic->method);
+ "stream js periodic \"%V\" is already running, killing "
+ "previous instance", &periodic->method);
ngx_stream_js_periodic_finalize(c->data, NGX_ERROR);
}