NAME

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

Synopsis

use Apache::Response ();

META: to be completed

Description

META: to be completed

API

Apache::Response provides the following functions and/or methods:

custom_response

META: Autogenerated - needs to be reviewed/completed

Install a custom response handler for a given status

$r->custom_response($status, $string);
arg1: $r (Apache::RequestRec)

The current request

arg2: $status (integer)

The status for which the custom response should be used

arg3: $string (string)

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

ret: no return value

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);
arg1: $r (Apache::RequestRec)

The current request

arg2: $force_weak (number)

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

ret: $etag (string)

The entity tag

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();
arg1: $r (Apache::RequestRec)

The current request

ret: $ret (integer)

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

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);
arg1: $r (Apache::RequestRec)

The current request

arg2: $mtime (number)

The last modified time

ret: $rat_mtime (number)

the latest rational time.

send_error_response

META: Autogenerated - needs to be reviewed/completed

Send error back to client.

$r->send_error_response($recursive_error);
arg1: $r (Apache::RequestRec)

The current request

arg2: $recursive_error (string)

last arg indicates error status in case we get an error in the process of trying to deal with an 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 ErrorDocument.

ret: no return value

send_mmap

META: Autogenerated - needs to be reviewed/completed

Send an MMAP'ed file to the client

$ret = $r->send_mmap($mm, $offset, $length);
arg1: $r (Apache::RequestRec)

The current request

arg2: $mm (APR::Mmap)

The MMAP'ed file to send

arg3: $offset (number)

The offset into the MMAP to start sending

arg4: $length (integer)

The amount of data to send

ret: $ret (integer)

The number of bytes sent

set_content_length

META: Autogenerated - needs to be reviewed/completed

Set the content length for this request.

$r->set_content_length($length);
arg1: $r (Apache::RequestRec)

The current request

arg2: $length (integer)

The new content length

ret: no return value

set_etag

META: Autogenerated - needs to be reviewed/completed

Set the E-tag outgoing header

$r->set_etag();
arg1: $r (Apache::RequestRec)
ret: no return value

set_keepalive

META: Autogenerated - needs to be reviewed/completed

Set the keepalive status for this request

$ret = $r->set_keepalive();
arg1: $r (Apache::RequestRec)

The current request

ret: $ret (integer)

1 if keepalive can be set, 0 otherwise

update_mtime

META: Autogenerated - needs to be reviewed/completed

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

$r->update_mtime($dependency_mtime);
arg1: $r (Apache::RequestRec)

The current request

arg2: $dependency_mtime (number)
ret: no return value

set_last_modified

META: Autogenerated - needs to be reviewed/completed

$r->set_last_modified($mtime);
arg1: $r (Apache::RequestRec)
arg2: $mtime (number)
ret: no return value

send_cgi_header

META: Autogenerated - needs to be reviewed/completed

$r->send_cgi_header($buffer);
arg1: $r (Apache::RequestRec)
arg2: $buffer (string)
ret: no return value

See Also

mod_perl 2.0 documentation.

Copyright

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

Authors

The mod_perl development team and numerous contributors.