Anatomy of a request

From EPrints Documentation
Revision as of 13:54, 13 October 2014 by Libjlrs (Talk | contribs)

Jump to: navigation, search

This is a description of how EPrints and Apache handle an incoming request. Understanding this flow helps understand how an Access Control layer can be added to the system.

I will assume that you know how to locate a perl module file from the module name (e.g. EPrints::Apache::Rewrite will probably be ~/perl_lib/EPrints/Apache/Rewrite.pm, although this is not always the case!).

Below are relevant parts of config files and perl modules that are used with when processing a request:

  • Apache core config ~/cfg/apache.conf
PerlSwitches -I/home/eprints/eprints-3.3.12/perl_lib
PerlModule EPrints
PerlPostConfigHandler +EPrints::post_config_handler

The post_config_handler does some sanity checks on the EPrints setup (e.g. is Apache listening to the ports that the repositories are configured to work under) See: http://perl.apache.org/docs/2.0/user/handlers/server.html#C_PerlPostConfigHandler_ for more info about the post_config_handler

  • Apache repository config ~/cfg/apache/ARCHIVEID.conf
<VirtualHost *:80>
...
  PerlTransHandler +EPrints::Apache::Rewrite
 
</VirtualHost>

This leads us to the backbone of EPrints - the Rewrite module - where URL_REWRITE_* triggers are called; content negotiation can happen, as well as many other wonderous things!

  • EPrints::Apache::Rewrite module

TODO: Explain flow of Rewrite - triggers - cgi - content negotiation - CRUD - ???

Access Control Layer