Difference between revisions of "Anatomy of a request"

From EPrints Documentation
Jump to: navigation, search
Line 27: Line 27:
 
*<code>EPrints::Apache::Rewrite</code> module
 
*<code>EPrints::Apache::Rewrite</code> module
  
'TODO:
+
==TODO (some should be seperate pages)==
 
*Explain flow of Rewrite
 
*Explain flow of Rewrite
 
**triggers
 
**triggers

Revision as of 14:05, 13 October 2014

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 (some should be seperate pages)

  • Explain flow of Rewrite
    • triggers
    • cgi
    • content negotiation
    • CRUD
    • ???
  • permit on DataObj
    • can_request_view / can_user_view
  • summary pages (content neg/ URL rewrite)
  • DOI - 5 metadata elements
  • 40x handling
Access Control Layer