ngx_http_perl_set_request(r, ctx);
+ if (ctx->variable) {
+ croak("status(): cannot be used in variable handler");
+ }
+
r->headers_out.status = SvIV(ST(1));
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
croak("send_http_header(): called after error");
}
+ if (ctx->variable) {
+ croak("send_http_header(): cannot be used in variable handler");
+ }
+
if (r->headers_out.status == 0) {
r->headers_out.status = NGX_HTTP_OK;
}
ngx_http_perl_set_request(r, ctx);
+ if (ctx->variable) {
+ croak("has_request_body(): cannot be used in variable handler");
+ }
+
if (ctx->next) {
croak("has_request_body(): another handler active");
}
ngx_http_perl_set_request(r, ctx);
+ if (ctx->variable) {
+ croak("discard_request_body(): cannot be used in variable handler");
+ }
+
rc = ngx_http_discard_request_body(r);
if (rc != NGX_OK) {
croak("header_out(): called after error");
}
+ if (ctx->variable) {
+ croak("header_out(): cannot be used in variable handler");
+ }
+
key = ST(1);
value = ST(2);
croak("print(): called after error");
}
+ if (ctx->variable) {
+ croak("print(): cannot be used in variable handler");
+ }
+
if (items == 2) {
/*
croak("sendfile(): called after error");
}
+ if (ctx->variable) {
+ croak("sendfile(): cannot be used in variable handler");
+ }
+
filename = SvPV_nolen(ST(1));
if (filename == NULL) {
croak("flush(): called after error");
}
+ if (ctx->variable) {
+ croak("flush(): cannot be used in variable handler");
+ }
+
b = ngx_calloc_buf(r->pool);
if (b == NULL) {
ctx->error = 1;
ngx_http_perl_set_request(r, ctx);
+ if (ctx->variable) {
+ croak("internal_redirect(): cannot be used in variable handler");
+ }
+
uri = ST(1);
if (ngx_http_perl_sv2str(aTHX_ r, &ctx->redirect_uri, uri) != NGX_OK) {
ngx_http_perl_set_request(r, ctx);
+ if (ctx->variable) {
+ croak("allow_ranges(): cannot be used in variable handler");
+ }
+
r->allow_ranges = 1;
ngx_http_perl_set_request(r, ctx);
+ if (ctx->variable) {
+ croak("sleep(): cannot be used in variable handler");
+ }
+
if (ctx->next) {
croak("sleep(): another handler active");
}