EPrints Technical Mailing List Archive
Message: #01303
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Adding a custom PerlResponseHandler
- To: "'eprints-tech@ecs.soton.ac.uk'" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Adding a custom PerlResponseHandler
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Wed, 14 Nov 2012 14:21:26 +0000
Hi, I'm trying to work out the best way to add a custom handler for a URL to a specific archive within eprints. I can either set something like this in the vhost (and add '/foo/' to $c->{rewrite_exceptions} ): <Location "/foo/handler"> SetHandler perl-script PerlResponseHandler Foo::FooHandler </Location> - OR - I could edit ~/perl_lib/EPrints/Apache/Rewrite.pm, adding something like: if ( $uri =~ m! ^$urlpath/foo !x ) { $r->handler( 'perl-script' ); $r->set_handlers( PerlResponseHandler => [ 'Foo::FooHandler' ] ); return OK; } BUT I wouldn't /really/ want to do that, as it would affect all archives, not just the one I want it to. So, what is the *most* sensible way to do this, making it apply to only one archive? Am I missing some magic that will help me? Cheers, John
- Prev by Date: [EP-tech] epadmin cleanup_cachemaps
- Next by Date: [EP-tech] Re: Adding a custom PerlResponseHandler
- Previous by thread: [EP-tech] epadmin cleanup_cachemaps
- Next by thread: [EP-tech] Re: Adding a custom PerlResponseHandler
- Index(es):