HTTP.pm


NAME

Communiware::HTTP - Communiware HTTP handler


SYNOPSIS

Provides HTTP request handler


DESCRIPTION

loging functions

SYNOPSIS

log_http_crit('some critical information'); ... log_http_debug('some debug information');

DESCRIPTION

Wrappers for using in HTTP-handler.

handler

Apache content handler

hterror

        return hterror($r, $status, $dbh, $host, $site);

Handles an HTTP error with status `$status'. I.e. searches for appropriate error document and sets custom response. $host and $site may be omitted.

client_info

        ($user_agent, $remote_ip, $forwarders, $accept_types) = client_info($r);

Fetches HTTP client information from request. $forwarders and $accept_types are array refs.

parse_uri

        ($is_file, $site, $item, $template, $file_tail) =
                parse_uri($uri, $host, $dbh);

Parses URI and host header to ``is a file'', site, item, template and file ``name''.

check_restrict_templates

        check_restrict_templates($site_ctx, $item_ctx, $template_ctx);

Checks whether it is allowed to show this item via this site and this template

http_setup_self_url

This is an internal proc called from init_context. It sets up $Communiware::self_url parameter

error_context

returns linearized hash of attributes ERROR_ITEM_ID and ERROR_TEMPLATE if there was an HTTP error.

If current request is not ErrorDocument, returns empty list

send_document

        send_document($r, $doc);

Sends document collected in Communiware::Document $doc via apache request $r.

16 октябрь 2007 13:44