Name
ap_scan_script_header_err — scan the headers output by a CGI
Synopsis
int ap_scan_script_header_err(request_rec *r, FILE *f, char *buffer)
Read the headers arriving from a CGI on f
,
checking them for correctness. Most headers are simply stored in
r->headers_out
, which means
they’ll ultimately be sent to the client, but a few
are dealt with specially:
-
Status
If this is set, it is used as the HTTP response code.
-
Location
If this is set, the result is a redirect to the URL specified.
If buffer
is provided (it can be
NULL
), then — should the script send an
illegal header — it will be left in buffer
,
which must be at least MAX_STRING_LEN
bytes long.
The return value is HTTP_OK
, the status set by the
script, or SERVER_ERROR
if an error occurred.
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.