Name
http_output_flush, http_is_flushed, http_redirected_path, http_physical_path_resolve, http_limited, http_set_params, http_on_message — HTTP response I/O lifecycle and request-routing helpers
Synopsis
http_output_flush(
|
); |
integer http_is_flushed(
|
); |
varchar http_redirected_path(
|
); |
varchar http_physical_path_resolve(
|
in logical_path varchar); |
integer http_limited(
|
in limit_kind varchar); |
http_set_params(
|
in params any); |
http_on_message(
|
in callback_kind integer, |
| in procedure_name varchar, | |
| in extra any, | |
| in flag integer, | |
in flag2 integer); |
Description
http_output_flush immediately sends every buffered
byte of the current response to the network. Useful when streaming long
responses without waiting for handler completion.
http_is_flushed returns 1 if the response has already
been flushed and 0 otherwise. Use it to avoid touching the response body
after the headers have left the server.
http_redirected_path returns the URL path that the
current request was rewritten to (through
http_internal_redirect or URL-rewrite rules), or SQL
NULL when no redirect happened.
http_physical_path_resolve maps a logical URL path to
the underlying physical filesystem path according to the HTTP-mapping
table, or returns SQL NULL if no mapping applies. Companion of the
documented http_physical_path which returns the path
of the current request.
http_limited returns 1 if the current request is
subject to a server-side rate or size limit. The optional argument selects
which limit class is checked.
http_set_params replaces the current request's
parameter vector with params (a vector of
name/value pairs). Use sparingly — subsequent
http_param calls see the new values.
http_on_message registers a procedure to be invoked
on selected HTTP lifecycle events (request begin, end, error, body
received). callback_kind selects the event type;
the extra arguments are passed to the callback. Pass NULL for
procedure_name to deregister an existing callback.