Difference between revisions of "API:EPrints/Apache/AnApache"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
+
This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{Pod2Wiki}}{{API:Source|file=EPrints/Apache/AnApache.pm|package_name=EPrints::Apache::AnApache}}[[Category:API|AnApache]]<!-- End of Pod2Wiki -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Apache/AnApache.pm|package_name=EPrints::Apache::AnApache}}[[Category:API|ANAPACHE]][[Category:API:EPrints/Apache|ANAPACHE]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::Apache::AnApache''' - Load appropriate Apache Module
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
 
Handy way of loading Apache or Apache2 depending on value in SystemSettings.
 
  
Plus functions to paper over the cracks between the two interfaces.
+
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 +
==NAME==
 +
'''EPrints::Apache::AnApache''' - Utility methods for talking to mod_perl
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_upload_doc_file -->==upload_doc_file==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  EPrints::Apache::AnApache::upload_doc_file( $session, $document, $paramid );
 
  
Collect a file named $paramid uploaded via HTTP and add it to the specified $document.
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_description -->
 +
==DESCRIPTION==
 +
This module provides a number of utility methods for interacting with the request object.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_upload_doc_archive -->==upload_doc_archive==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  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.
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_methods -->
 +
==METHODS==
 +
<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>
 +
<!-- Edit below this comment -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_send_http_header -->==send_http_header==
 
  
  EPrints::Apache::AnApache::send_http_header( $request )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_send_http_header -->
 +
===send_http_header===
  
 +
EPrints::Apache::AnApache::send_http_header( $request )
 
Send the HTTP header, if needed.
 
Send the HTTP header, if needed.
  
 
$request is the current Apache request.  
 
$request is the current Apache request.  
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_header_out -->==header_out==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
  
  EPrints::Apache::AnApache::header_out( $request, $header, $value )
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_header_out -->
 +
===header_out===
  
 +
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.
 
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.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_header_in -->==header_in==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $value = EPrints::Apache::AnApache::header_in( $request, $header )
 
  
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_header_in -->
 +
===header_in===
 +
 +
$value = EPrints::Apache::AnApache::header_in( $request, $header )
 
Return the specified HTTP header from the current request.
 
Return the specified HTTP header from the current request.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_$request -->==$request==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $request = EPrints::Apache::AnApache::get_request
 
  
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_$request -->
 +
===$request===
 +
 +
$request = EPrints::Apache::AnApache::get_request
 
Return the current Apache request object.
 
Return the current Apache request object.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_cookie -->==cookie==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $value = EPrints::Apache::AnApache::cookie( $request, $cookieid )
 
  
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_cookie -->
 +
===cookie===
 +
 +
$value = EPrints::Apache::AnApache::cookie( $request, $cookieid )
 
Return the value of the named cookie, or undef if it is not set.
 
Return the value of the named cookie, or undef if it is not set.
  
This avoids using {{API:PodLink|file=CGI|package_name=CGI|section=|text=CGI}}, so does not consume the POST data.
+
This avoids using CGI, so does not consume the POST data.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_send_status_line -->==send_status_line==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  EPrints::Apache::AnApache::send_status_line( $request, $code, $message )
 
  
Send a HTTP status to the client with $code and $message.
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_upload_doc_file -->
 +
===upload_doc_file===
 +
 
 +
EPrints::Apache::AnApache::upload_doc_file( $session, $document, $paramid );
 +
Collect a file named $paramid uploaded via HTTP and add it to the specified $document.
 +
 
 +
<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>
 +
<!-- Edit below this comment -->
 +
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
+
</div>
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=item_upload_doc_archive -->
<!-- Pod2Wiki=item_auth_required -->==auth_required==
+
===upload_doc_archive===
  
  AUTH_REQUIRED
+
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.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_declined -->==declined==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  DECLINED
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_done -->==done==
+
</div>
 +
<!-- Pod2Wiki=item_send_status_line -->
 +
===send_status_line===
  
  DONE
+
EPrints::Apache::AnApache::send_status_line( $request, $code, $message )
 +
Send a HTTP status to the client with $code and $message.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_forbidden -->==forbidden==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  FORBIDDEN
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_not_found -->==not_found==
+
</div>
 +
<!-- Pod2Wiki=item_ranges -->
 +
===ranges===
  
  NOT_FOUND
+
$rc = EPrints::Apache::AnApache::ranges( $r, $maxlength, $chunks )
 +
Populates the byte-ranges in $chunks requested by the client.
  
<!-- End of Pod2Wiki -->
+
$maxlength is the length, in bytes, of the resource.
<!-- Pod2Wiki=item_ok -->==ok==
 
  
  OK
+
Returns the appropriate byte-range result code or OK if no "Range" header is set.
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=item_redirect -->==redirect==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  REDIRECT
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_server_error -->==server_error==
+
</div>
 +
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 +
{{API:Copyright}}
 +
<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>
 +
<!-- Edit below this comment -->
  
  SERVER_ERROR
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
</div>
 +
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->

Revision as of 20:48, 14 December 2021

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

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


NAME

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

User Comments


DESCRIPTION

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

User Comments


METHODS

User Comments


send_http_header

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

Send the HTTP header, if needed.

$request is the current Apache request.

User Comments


header_out

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

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

Return the specified HTTP header from the current request.

User Comments


$request

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

Return the current Apache request object.

User Comments


cookie

$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

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

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

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

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

User Comments


ranges

$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

© Copyright 2023 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

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

LICENSE

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