EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10046
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
RE: [EP-tech] Help with redirect loops in EPrints 3.3.16
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: RE: [EP-tech] Help with redirect loops in EPrints 3.3.16
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Sun, 16 Mar 2025 21:28:45 +0000
CAUTION: This e-mail originated outside the University of Southampton. Hi Gunnar, The 'frontpage' URL is probably an easy one to trace. It gets set in the EPrints::Repository module (unless explicitly declared in the config somewhere): $config->{"frontpage"} ||= $config->{"http_url"} . "/"; so trying to trace how/where 'http_url' is getting set in the archive's cfg.d directory is probably the next step. I would grep through the ARCHIVEID/cfg/cfg.d/ directory for 'http_url' and/or 'http:' - in case there is something that is setting e.g. $c->{http_url} = 'http://'.$c->{hostname}; which your search might not have picked up. Cheers, John -----Original Message----- From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> On Behalf Of Gunnar Wolf Sent: 15 March 2025 23:37 To: eprints-tech@ecs.soton.ac.uk Subject: Re: [EP-tech] Help with redirect loops in EPrints 3.3.16 CAUTION: External Message. Use caution opening links and attachments. CAUTION: This e-mail originated outside the University of Southampton. CAUTION: This e-mail originated outside the University of Southampton. Hello John, John Salter dijo [Thu, Mar 13, 2025 at 09:25:25AM +0000]: > >Hi Gunnar, > > It might also be worth looking in >[EPRINTS_ROOT]/archives/[ARCHIVE_ID]/cfg/cfg.d/20_baseurls.pl - maybe >compare it with the default >https://githu/ >b.com%2Feprints%2Feprints%2Fblob%2F3.3%2Flib%2Fdefaultcfg%2Fcfg.d%2F20_ >baseurls.pl&data=05%7C02%7Cj.salter%40leeds.ac.uk%7C22961be385ef4be4507 >b08dd641a7189%7Cbdeaeda8c81d45ce863e5232a535b7cb%7C0%7C0%7C638776786940 >875227%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAw >MCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata >=CErWgeMMFQBqL%2B3Mtes3QF%2BMDeIgq0%2FETQp95XhLTb4%3D&reserved=0 > >If your repository was created a while ago on e.g. v3.3.10, the logic >in that file might prefer http over https. > >There is also a line in that file which sets the base_url, which will >overwrite the value you set in 10_core.pl. This repository was created somewhere in 2012, so... quite likely! However, I had already updated the values in 20_baseurls as well :-\ >You can check the calculated values of all the config options using >this (replace EPRINTS_ROOT and ARCHIVE_ID with correct values): > >perl -IEPRINTS_ROOT/perl_lib -e 'use EPrints; use Data::Dumper; $Data::Dumper::Maxdepth = 2; $s = new EPrints::Session( 1, "ARCHIVE_ID", 0 ); print Dumper( $s->{config} );' Thanks for this snippet,it is most interesting! >It will dump a lot of data out (the EPrints session has a lot in it!), >so maybe pipe the output into a file or through 'less'. >The 'Maxdepth' will limit the amount of info. The things you're >interested in - URLs etc. should all live at the top config level, so >it should show you useful info. Interesting indeed! However... what can I do now that I have confirmed this? I found repeated URLs for my domain with an http:// protocol, for values that I know I have declared to be https (and must be, I suppose, overwritten further down the stack..?) At least, I get: 'http_cgiurl' => bless( do{\(my $o = 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fru.iiec.unam.mx%2Fcgi&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1ea5fda66b3b423a0d9708dd64d189ed%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638777573317817329%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=0NvVFmb1vTkHRRfK0fysGXUUenltjj3fEYq5Pe7pywY%3D&reserved=0')}, 'URI::http' ), 'base_url' => 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fru.iiec.unam.mx%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1ea5fda66b3b423a0d9708dd64d189ed%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638777573317840518%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=RXt8kdmDt1n1PLgcHooh7UXt5AvYBFDAP%2FnzZxjmxlw%3D&reserved=0', 'perl_url' => 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fru.iiec.unam.mx%2Fcgi&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1ea5fda66b3b423a0d9708dd64d189ed%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638777573317857621%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=8eJ3AlIDsmw9LkADyJmpag%2BEDCs%2FFQLJokjhF%2BU9rOo%3D&reserved=0', 'frontpage' => 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fru.iiec.unam.mx%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1ea5fda66b3b423a0d9708dd64d189ed%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638777573317876872%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=JpVcdXPkQG4fHJfA97pLnJGu7BbLFzF9BQbvMyy%2BlnE%3D&reserved=0', 'http_url' => bless( do{\(my $o = 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fru.iiec.unam.mx%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1ea5fda66b3b423a0d9708dd64d189ed%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638777573317893144%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=QNKrdWQQ4e%2Ffr5h%2BBAY8i7WMSgOn8zi3ZNpjiB2WLS4%3D&reserved=0')}, 'URI::http' ), 'vlit' => { 'copyright_url' => 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fru.iiec.unam.mx%2Fvlit.html&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1ea5fda66b3b423a0d9708dd64d189ed%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638777573317904959%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=XZ8eN4YSCw5vnL%2BmIvbJRVanDa9bsmMsHFdJID0TXPE%3D&reserved=0' } However, I'm *sure* they are not part of my declared configuration: There is not a single /http:.*ru.iiec/ under cfg/cfg.d. Where else should I be looking?
- References:
- [EP-tech] Help with redirect loops in EPrints 3.3.16
- From: Gunnar Wolf <gwolf@gwolf.org>
- Re: [EP-tech] Help with redirect loops in EPrints 3.3.16
- From: Yuri Carrer <yuri.carrer@unipd.it>
- RE: [EP-tech] Help with redirect loops in EPrints 3.3.16
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Help with redirect loops in EPrints 3.3.16
- From: Gunnar Wolf <gwolf@gwolf.org>
- [EP-tech] Help with redirect loops in EPrints 3.3.16
- Prev by Date: RE: [EP-tech] Contributor_types not registering on RIS import
- Next by Date: [EP-tech] Custom views and <pin name="value1" /> and viewname_eprint_* phrases
- Previous by thread: Re: [EP-tech] Help with redirect loops in EPrints 3.3.16
- Next by thread: Re: [EP-tech] Help with redirect loops in EPrints 3.3.16
- Index(es):