Jump to content

API:EPrints/Apache/AnApache: Difference between revisions

From EPrints Documentation
Pod2wiki (talk | contribs)
No edit summary
Pod2wiki (talk | contribs)
No edit summary
 
Line 26: Line 26:
<!-- Pod2Wiki= -->
<!-- Pod2Wiki= -->
</div>
</div>
<!-- Pod2Wiki=head_constantsfor_backwards_compatibility_use_c_http_constants_instead_of_c_common_constants -->
<!-- Pod2Wiki=head_constants -->
==CONSTANTSFor backwards compatibility - use <tt>HTTP_</tt> constants instead of <tt>:common</tt> constants.==
==CONSTANTS==
For backwards compatibility - use <tt>HTTP_</tt> constants instead of <tt>:common</tt> constants.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<span style='display:none'>User Comments</span>
<span style='display:none'>User Comments</span>

Latest revision as of 12:33, 15 March 2023

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME[edit]

EPrints::Apache::AnApache - Utility methods for talking to mod_perl

User Comments


DESCRIPTION[edit]

This module provides a number of utility methods for interacting with the request object.

User Comments


CONSTANTS[edit]

For backwards compatibility - use HTTP_ constants instead of :common constants.

User Comments


AUTH_REQUIRED[edit]

Maps to EPrints::Const::HTTP_UNAUTHORIZED. Authorization is required to access the requested resource.

User Comments


FORBIDDEN[edit]

Maps to EPrints::Const::HTTP_FORBIDDEN. Access to the requested resource is forbidden.

User Comments


SERVER_ERROR[edit]

Maps to EPrints::Const::HTTP_INTERNAL_SERVER_ERROR. Requesting the resource has caused an internal server error.

User Comments


METHODS[edit]

User Comments


send_http_header[edit]

EPrints::Apache::AnApache::send_http_header( $request )

Send the HTTP header, if needed.

$request is the current Apache request.

User Comments


header_out[edit]

EPrints::Apache::AnApache::header_out( $request, $header, $value )

Set a value in the HTTP headers of the response. $request is the apache request object, $header is the name of the header and $value is the value to give that header.

User Comments


header_in[edit]

$value = EPrints::Apache::AnApache::header_in( $request, $header )

Return the specified HTTP header from the current request.

User Comments


$request[edit]

$request = EPrints::Apache::AnApache::get_request

Return the current Apache request object.

User Comments


cookie[edit]

$value = EPrints::Apache::AnApache::cookie( $request, $cookieid )

Return the value of the named cookie, or undef if it is not set.

This avoids using CGI, so does not consume the POST data.

User Comments


upload_doc_file[edit]

EPrints::Apache::AnApache::upload_doc_file( $session, $document, $paramid );

Collect a file named $paramid uploaded via HTTP and add it to the specified $document.

User Comments


upload_doc_archive[edit]

EPrints::Apache::AnApache::upload_doc_archive( $session, $document, $paramid, $archive_format );

Collect an archive file (.ZIP, .tar.gz, etc.) uploaded via HTTP and unpack it then add it to the specified document.

User Comments


send_status_line[edit]

EPrints::Apache::AnApache::send_status_line( $request, $code, $message )

Send a HTTP status to the client with $code and $message.

User Comments


send_hidden_status_line[edit]

EPrints::Apache::AnApache::send_hidden_status_line( $request, $code )

Send a hidden HTTP status to the client with $code.

This is intended for where EPrints already displays a useful error message but a 200 HTTP status code is otherwise logged.

User Comments


ranges[edit]

$rc = EPrints::Apache::AnApache::ranges( $r, $maxlength, $chunks )

Populates the byte-ranges in $chunks requested by the client.

$maxlength is the length, in bytes, of the resource.

Returns the appropriate byte-range result code or OK if no Range header is set.

User Comments


COPYRIGHT[edit]

© Copyright 2000-2024 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE[edit]

This file is part of EPrints 3.4 http://www.eprints.org/.

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.

User Comments