3
Apache::Response - Perl API for Apache HTTP request response methods
10
use Apache::Response ();
26
C<Apache::Response> provides the following functions and/or methods:
31
=head2 C<custom_response>
33
META: Autogenerated - needs to be reviewed/completed
35
Install a custom response handler for a given status
37
$r->custom_response($status, $string);
41
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
45
=item arg1: C<$status> (integer)
47
The status for which the custom response should be used
49
=item arg2: C<$string> (string)
51
The custom response. This can be a static string, a file
54
=item ret: no return value
64
META: Autogenerated - needs to be reviewed/completed
66
Construct an entity tag from the resource information. If it's a real
67
file, build in some of the file characteristics.
69
$etag = $r->make_etag($force_weak);
73
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
77
=item arg1: C<$force_weak> (number)
79
Force the entity tag to be weak - it could be modified
80
again in as short an interval.
82
=item ret: C<$etag> (string)
92
=head2 C<meets_conditions>
94
META: Autogenerated - needs to be reviewed/completed
96
Implements condition GET rules for HTTP/1.1 specification. This function
97
inspects the client headers and determines if the response fulfills
98
the requirements specified.
100
$ret = $r->meets_conditions();
104
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
108
=item ret: C<$ret> (integer)
110
1 if the response fulfills the condition GET rules, 0 otherwise
118
=head2 C<rationalize_mtime>
120
META: Autogenerated - needs to be reviewed/completed
122
Return the latest rational time from a request/mtime pair. Mtime is
123
returned unless it's in the future, in which case we return the current time.
125
$rat_mtime = $r->rationalize_mtime($mtime);
129
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
133
=item arg1: C<$mtime> (number)
135
The last modified time
137
=item ret: C<$rat_mtime> (number)
139
the latest rational time.
147
=head2 C<send_error_response>
149
META: Autogenerated - needs to be reviewed/completed
151
Send error back to client.
153
$r->send_error_response($recursive_error);
157
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
161
=item arg1: C<$recursive_error> (string)
163
last arg indicates error status in case we get an error in the process
164
of trying to deal with an C<ErrorDocument> to handle some other error.
165
In that case, we print the default report for the first thing that
166
went wrong, and more briefly report on the problem with the
169
=item ret: no return value
179
META: Autogenerated - needs to be reviewed/completed
181
Send an MMAP'ed file to the client
183
$ret = $r->send_mmap($mm, $offset, $length);
187
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
191
=item arg1: C<$mm> (C<L<APR::Mmap|docs::2.0::api::APR::Mmap>>)
193
The MMAP'ed file to send
195
=item arg2: C<$offset> (number)
197
The offset into the MMAP to start sending
199
=item arg3: C<$length> (integer)
201
The amount of data to send
203
=item ret: C<$ret> (integer)
205
The number of bytes sent
213
=head2 C<set_content_length>
215
META: Autogenerated - needs to be reviewed/completed
217
Set the content length for this request.
219
$r->set_content_length($length);
223
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
227
=item arg1: C<$length> (integer)
229
The new content length
231
=item ret: no return value
241
META: Autogenerated - needs to be reviewed/completed
243
Set the E-tag outgoing header
249
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
251
=item ret: no return value
259
=head2 C<set_keepalive>
261
META: Autogenerated - needs to be reviewed/completed
263
Set the keepalive status for this request
265
$ret = $r->set_keepalive();
269
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
273
=item ret: C<$ret> (integer)
275
1 if keepalive can be set, 0 otherwise
283
=head2 C<update_mtime>
285
META: Autogenerated - needs to be reviewed/completed
287
Function to set the r-E<gt>mtime field to the specified value if it's
288
later than what's already there.
290
$r->update_mtime($dependency_mtime);
294
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
298
=item arg1: C<$dependency_mtime> (number)
300
=item ret: no return value
308
=head2 C<set_last_modified>
310
META: Autogenerated - needs to be reviewed/completed
314
$r->set_last_modified($mtime);
318
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
320
=item arg1: C<$mtime> (number)
322
=item ret: no return value
330
=head2 C<send_cgi_header>
332
META: Autogenerated - needs to be reviewed/completed
336
$r->send_cgi_header($buffer);
340
=item obj: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
342
=item arg1: C<$buffer> (string)
344
=item ret: no return value
353
L<mod_perl 2.0 documentation|docs::2.0::index>.
360
mod_perl 2.0 and its core modules are copyrighted under
361
The Apache Software License, Version 1.1.
368
L<The mod_perl development team and numerous
369
contributors|about::contributors::people>.