![]() |
Home / Documentation / 2.0 / API / | ![]() |
||
![]() ![]() ![]() |
||||
Apache::Response - Perl API for Apache HTTP request response methods | ||||
![]() ![]() |
|
||
custom_response
META: Autogenerated - needs to be reviewed/completed
Install a custom response handler for a given status
$r->custom_response($status, $string);
$r
(Apache::RequestRec
)
The current request
$status
(integer)
The status for which the custom response should be used
$string
(string)
The custom response. This can be a static string, a file or a URL
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);
$r
(Apache::RequestRec
)
The current request
$force_weak
(number)
Force the entity tag to be weak - it could be modified again in as short an interval.
$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();
$r
(Apache::RequestRec
)
The current request
$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);
$r
(Apache::RequestRec
)
The current request
$mtime
(number)
The last modified time
$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);
$r
(Apache::RequestRec
)
The current request
$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
.
send_mmap
META: Autogenerated - needs to be reviewed/completed
Send an MMAP'ed file to the client
$ret = $r->send_mmap($mm, $offset, $length);
$r
(Apache::RequestRec
)
The current request
$mm
(APR::Mmap
)
The MMAP'ed file to send
$offset
(number)
The offset into the MMAP to start sending
$length
(integer)
The amount of data to send
$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);
$r
(Apache::RequestRec
)
The current request
$length
(integer)
The new content length
set_etag
META: Autogenerated - needs to be reviewed/completed
Set the E-tag outgoing header
$r->set_etag();
$r
(Apache::RequestRec
)
set_keepalive
META: Autogenerated - needs to be reviewed/completed
Set the keepalive status for this request
$ret = $r->set_keepalive();
$r
(Apache::RequestRec
)
The current request
$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);
$r
(Apache::RequestRec
)
The current request
$dependency_mtime
(number)
set_last_modified
META: Autogenerated - needs to be reviewed/completed
$r->set_last_modified($mtime);
$r
(Apache::RequestRec
)
$mtime
(number)
send_cgi_header
META: Autogenerated - needs to be reviewed/completed
$r->send_cgi_header($buffer);
$r
(Apache::RequestRec
)
$buffer
(string)
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 1.1.
|
![]() |
![]() ![]() ![]() |