<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.apple-tab-span
        {mso-style-name:apple-tab-span;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Adam,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">So essentially what you’re saying is that theoretically we can drop the /secure and /secure/cgi from the config?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I will have to try that if that is indeed the case.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Brian.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="color:#1F497D"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Adam Field<br>
<b>Sent:</b> Wednesday, September 23, 2015 12:30 PM<br>
<b>To:</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Subject:</b> [EP-tech] Re: https and $session->config('userhome')<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Try:<span style="font-size:12.0pt"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="apple-tab-span"> </span>$repo->config( "rel_path" )<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Also, would suggest not using a different path for secure. A modern 10_core should look something like this:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"># This file was created by bin/epadmin<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"># You can regenerate this file by doing ./bin/epadmin config_core tweets<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">$c->{host} = 'websci-tweets.ecs.soton.ac.uk';<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">$c->{port} = 80;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">$c->{aliases} = [];<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">$c->{securehost} = 'websci-tweets.ecs.soton.ac.uk';<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">$c->{secureport} = 443;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">$c->{http_root} = undef;<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">(stolen from one of my twitter harvesters.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">--<br>
Adam Field<br>
Business Relationship Manager and Community Lead<br>
EPrints Services<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On 21 Sep 2015, at 14:53, Brian D. Gregg <<a href="mailto:bdgregg@pitt.edu">bdgregg@pitt.edu</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="color:#1F497D">All,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">I did some digging on this trying different values to handle the problem of “Edit Profile” link being broken when under https after you login.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">I ended up replacing the line here:</span>
<span style="color:#1F497D"><a href="https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64">https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64</a>
with the following which now redirects properly under https. </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Here’s my code change for line 64 of EditLink.pm. I’m not sure what the difference is between the original code and my code as it seems as though they should be the same.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> my $config = $self->{config};</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> my $url = URI->new( $config->{"userhome"} );</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Also, using the standard https setup as documented here:
<a href="http://wiki.eprints.org/w/How_to_use_EPrints_with_HTTPS">http://wiki.eprints.org/w/How_to_use_EPrints_with_HTTPS</a> the include line for apache has changed to “Include /opt/eprints3/cfg/apache_ssl.conf” at what version this include has changed I have
no idea. I’d update the documentation but reluctant to do so as I don’t know when this changed version wise. This took a while to figure out.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Brian Gregg.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:18.0pt;color:#323E4F">Brian D. Gregg</span></b><o:p></o:p></p>
<p class="MsoNormal"><i><span style="font-size:14.0pt;color:#323E4F">Solutions Architect
</span></i><span style="font-size:14.0pt;color:#323E4F">|<i> Manager Systems Development</i></span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#323E4F">University of Pittsburgh | University Library System</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#323E4F">Address: <a href="https://maps.google.com/maps?q=7500+Thomas+Blvd,+Pittsburgh,+PA&hl=en&sll=41.117935,-77.604698&sspn=7.662465,13.73291&oq=7500+Tho&t=h&hnear=7500+Thomas+Blvd,+Pittsburgh,+Pennsylvania+15208&z=17" target="_blank">
7500 Thomas Blvd. Room 129 Pittsburgh, PA 15208</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#17365D">Tel: (412) 648-3264 | Email: <a href="mailto:bdgregg@pitt.edu">
bdgregg@pitt.edu</a> | Fax: (412) 648-3585</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">
eprints-tech-bounces@ecs.soton.ac.uk</a> [<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>]
<b>On Behalf Of </b>Brian D. Gregg<br>
<b>Sent:</b> Friday, September 18, 2015 12:21 PM<br>
<b>To:</b> '<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>' <<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>><br>
<b>Subject:</b> [EP-tech] https and $session->config('userhome')<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">All,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">What is the best config value to use for the base URL when dealing with both http and https connections?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I see in 10_core.pl the following defined, but obviously they don’t automatically switch based upon http vs. https.<o:p></o:p></p>
<p class="MsoNormal">$c->{http_root} = undef;<o:p></o:p></p>
<p class="MsoNormal">$c->{https_root} = '/secure';<o:p></o:p></p>
<p class="MsoNormal">$c->{http_cgiroot} = '/cgi';<o:p></o:p></p>
<p class="MsoNormal">$c->{https_cgiroot} = '/secure/cgi';<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">But is there a $session->config(‘{???}’) value that automatically switches between http and https as needed?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">The reason I am asking is in the code for meprints, we are having an issue with the “Edit Profile” link on the user’s homepage isn’t redirecting properly to https (aka “/secure/…”). I suspect that the issue is found here:
<a href="https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64">
https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64</a> However, I’m at a loss as to what to replace the $session->config( ‘userhome’ ) value with. I suspect that there
is a https or /secure that needs prepended to the string and I figure there is a short cut that I can use like $session->config( ‘cgiurl’ ) etc. or something similar.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Any suggestions?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Brian.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:18.0pt;color:#323E4F">Brian D. Gregg</span></b><o:p></o:p></p>
<p class="MsoNormal"><i><span style="font-size:14.0pt;color:#323E4F">Solutions Architect
</span></i><span style="font-size:14.0pt;color:#323E4F">|<i> Manager Systems Development</i></span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#323E4F">University of Pittsburgh | University Library System</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#323E4F">Address: <a href="https://maps.google.com/maps?q=7500+Thomas+Blvd,+Pittsburgh,+PA&hl=en&sll=41.117935,-77.604698&sspn=7.662465,13.73291&oq=7500+Tho&t=h&hnear=7500+Thomas+Blvd,+Pittsburgh,+Pennsylvania+15208&z=17" target="_blank">
7500 Thomas Blvd. Room 129 Pittsburgh, PA 15208</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#17365D">Tel: (412) 648-3264 | Email: <a href="mailto:bdgregg@pitt.edu">
bdgregg@pitt.edu</a> | Fax: (412) 648-3585</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">*** Options:
<a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br>
*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br>
*** EPrints developers Forum: <a href="http://forum.eprints.org/">http://forum.eprints.org/</a><o:p></o:p></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>