croak("send_http_header(): cannot be used in variable handler");
}
+ if (ctx->header_sent) {
+ croak("send_http_header(): header already sent");
+ }
+
+ if (ctx->redirect_uri.len) {
+ croak("send_http_header(): cannot be used with internal_redirect()");
+ }
+
if (r->headers_out.status == 0) {
r->headers_out.status = NGX_HTTP_OK;
}
croak("print(): cannot be used in variable handler");
}
+ if (!ctx->header_sent) {
+ croak("print(): header not sent");
+ }
+
if (items == 2) {
/*
croak("sendfile(): cannot be used in variable handler");
}
+ if (!ctx->header_sent) {
+ croak("sendfile(): header not sent");
+ }
+
filename = SvPV_nolen(ST(1));
if (filename == NULL) {
croak("flush(): cannot be used in variable handler");
}
+ if (!ctx->header_sent) {
+ croak("flush(): header not sent");
+ }
+
b = ngx_calloc_buf(r->pool);
if (b == NULL) {
ctx->error = 1;
croak("internal_redirect(): cannot be used in variable handler");
}
+ if (ctx->header_sent) {
+ croak("internal_redirect(): header already sent");
+ }
+
uri = ST(1);
if (ngx_http_perl_sv2str(aTHX_ r, &ctx->redirect_uri, uri) != NGX_OK) {