=head1 NAME

Apache::Response - Perl API for Apache HTTP request response methods




=head1 Synopsis

  use Apache::Response ();

META: to be completed




=head1 Description

META: to be completed




=head1 API

C<Apache::Response> provides the following functions and/or methods:




=head2 C<custom_response>

META: Autogenerated - needs to be reviewed/completed

Install a custom response handler for a given status

  $r->custom_response($status, $string);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$status> (integer)

The status for which the custom response should be used

=item arg3: C<$string> (string)

The custom response.  This can be a static string, a file
or a URL

=item ret: no return value

=back





=head2 C<make_etag>

META: Autogenerated - needs to be reviewed/completed

Construct an entity tag from the resource information.  If it's a real
file, build in some of the file characteristics.

  $etag = $r->make_etag($force_weak);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$force_weak> (number)

Force the entity tag to be weak - it could be modified
again in as short an interval.

=item ret: C<$etag> (string)

The entity tag

=back





=head2 C<meets_conditions>

META: Autogenerated - needs to be reviewed/completed

Implements condition GET rules for HTTP/1.1 specification.  This function
inspects the client headers and determines if the response fulfills
the requirements specified.

  $ret = $r->meets_conditions();

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item ret: C<$ret> (integer)

1 if the response fulfills the condition GET rules, 0 otherwise

=back





=head2 C<rationalize_mtime>

META: Autogenerated - needs to be reviewed/completed

Return the latest rational time from a request/mtime pair.  Mtime is
returned unless it's in the future, in which case we return the current time.

  $rat_mtime = $r->rationalize_mtime($mtime);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$mtime> (number)

The last modified time

=item ret: C<$rat_mtime> (number)

the latest rational time.

=back





=head2 C<send_error_response>

META: Autogenerated - needs to be reviewed/completed

Send error back to client.

  $r->send_error_response($recursive_error);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$recursive_error> (string)

last arg indicates error status in case we get an error in the process
of trying to deal with an C<ErrorDocument> to handle some other error.
In that case, we print the default report for the first thing that
went wrong, and more briefly report on the problem with the
C<ErrorDocument>.

=item ret: no return value

=back





=head2 C<send_mmap>

META: Autogenerated - needs to be reviewed/completed

Send an MMAP'ed file to the client

  $ret = $r->send_mmap($mm, $offset, $length);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$mm> (C<L<APR::Mmap|docs::2.0::api::APR::Mmap>>)

The MMAP'ed file to send

=item arg3: C<$offset> (number)

The offset into the MMAP to start sending

=item arg4: C<$length> (integer)

The amount of data to send

=item ret: C<$ret> (integer)

The number of bytes sent

=back





=head2 C<set_content_length>

META: Autogenerated - needs to be reviewed/completed

Set the content length for this request.

  $r->set_content_length($length);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$length> (integer)

The new content length

=item ret: no return value

=back





=head2 C<set_etag>

META: Autogenerated - needs to be reviewed/completed

Set the E-tag outgoing header

  $r->set_etag();

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

=item ret: no return value

=back





=head2 C<set_keepalive>

META: Autogenerated - needs to be reviewed/completed

Set the keepalive status for this request

  $ret = $r->set_keepalive();

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item ret: C<$ret> (integer)

1 if keepalive can be set, 0 otherwise

=back





=head2 C<update_mtime>

META: Autogenerated - needs to be reviewed/completed

Function to set the r-E<gt>mtime field to the specified value if it's
later than what's already there.

  $r->update_mtime($dependency_mtime);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$dependency_mtime> (number)

=item ret: no return value

=back





=head2 C<set_last_modified>

META: Autogenerated - needs to be reviewed/completed



  $r->set_last_modified($mtime);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

=item arg2: C<$mtime> (number)

=item ret: no return value

=back





=head2 C<send_cgi_header>

META: Autogenerated - needs to be reviewed/completed



  $r->send_cgi_header($buffer);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

=item arg2: C<$buffer> (string)

=item ret: no return value

=back




=head1 See Also

L<mod_perl 2.0 documentation|docs::2.0::index>.




=head1 Copyright

mod_perl 2.0 and its core modules are copyrighted under
The Apache Software License, Version 1.1.




=head1 Authors

L<The mod_perl development team and numerous
contributors|about::contributors::people>.

=cut

