EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #08597
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Antwort: RE: Short question about SSI in dynamic CGI output
- To: "jens.witzel@uzh.ch" <jens.witzel@uzh.ch>
- Subject: Re: [EP-tech] Antwort: RE: Short question about SSI in dynamic CGI output
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Fri, 7 May 2021 14:47:42 +0000
CAUTION: This e-mail originated outside the University of Southampton.
Hi Jens,
I'm glad it helped a bit - even if it wasn't a solution. A few more musings below. I think there must be a way to make it work.
The key is possibly in the PerlOutputFilterHandler.
In a cgi script, something like (entirely untested! Just thinking out loud...):
##############
use Apache2::Filter;
use Apache2::SSI;
my $r = $repo->get_request;
# do stuff, return page
##############
If you get it working, and you wanted it to apply to all cgi requests, you could put something similar in a URL rewrite trigger that matches 'cgi'.
Make sure the rewrite trigger does not set a return code - so the normal handlers will then process the actual request.
Cheers,
John
From: jens.witzel@uzh.ch <jens.witzel@uzh.ch>
Sent: 07 May 2021 13:28 To: John Salter <J.Salter@leeds.ac.uk> Cc: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>; jens.witzel@uzh.ch <jens.witzel@uzh.ch> Subject: Antwort: RE: [EP-tech] Short question about SSI in dynamic CGI output Dear John Hmmm, good question! If you print an SSI instruction directly from the CGI script, does that get converted as expected? E.g. does print '<!--#echo var="DATE_LOCAL" -->'; output a date, or '<!--#echo…'? I haven't used SSIs alongside EPrints, but if the above doesn't interpret the SSI instruction my guess would be the PerlResponseHandler used for CGI scripts within EPrints::Apache::Rewrite module. I find the diagram here: https://perl.apache.org/docs/2.0/user/handlers/http.html#HTTP_Request_Cycle_Phases useful to try and work out what the difference might be between e.g. a static page+template being served compared to a cgi script. The request for a CGI script might not trigger the SSI handler - but you may be able to add it to the stack, or a different phase (or even the output handlers). The start of this page: https://wiki.eprints.org/w/How_to_enable_server_side_includes indicates that someone has been down this path before: "If you want to add dynamic content to the template you should do this via a template part in cfg.d/dynamic_template.pl" They possibly included a maintenance.ssi file using perl-based methods rather than SSI methods? Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of jens.witzel--- via Eprints-tech Sent: 20 April 2021 16:06 To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] Short question about SSI in dynamic CGI output CAUTION: This e-mail originated outside the University of Southampton. Hi out there |
- Follow-Ups:
- Re: [EP-tech] Antwort: RE: Short question about SSI in dynamic CGI output
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Antwort: RE: Short question about SSI in dynamic CGI output
- References:
- [EP-tech] Short question about SSI in dynamic CGI output
- From: <jens.witzel@uzh.ch>
- Re: [EP-tech] Short question about SSI in dynamic CGI output
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Antwort: RE: Short question about SSI in dynamic CGI output
- From: <jens.witzel@uzh.ch>
- Re: [EP-tech] Antwort: RE: Short question about SSI in dynamic CGI output
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Short question about SSI in dynamic CGI output
- Prev by Date: [EP-tech] Antwort: RE: Short question about SSI in dynamic CGI output
- Next by Date: Re: [EP-tech] Plan S - Persistent Identifiers
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):