Hello Sam!

Thanks for your fix.

But actually the main source of trouble seems to have been wsgi 3.4. We 
reverted that back to 3.3 and it seems to work now as expected.

Concerning the release: JuSER calls itself 1.0.2.11-2232d, so I understand we 
are a bit beyond 1.0.2.

--

Kind regards,

Alexander Wagner
Subject Specialist
Central Library
52425 Juelich

mail : a.wag...@fz-juelich.de
phone: +49 2461 61-1586
Fax  : +49 2461 61-6103
www.fz-juelich.de/zb/DE/zb-fi

________________________________________
From: Samuele Kaplun [samuele.kap...@cern.ch]
Sent: Monday, April 15, 2013 21:53
To: Wagner, Alexander
Cc: project-invenio-devel (Invenio developers mailing-list); 
hgf-invenio-...@desy.de
Subject: Re: Invenio 1.0.2 @ FreeBSD 9.1

Hi Alex,

In data lunedì 15 aprile 2013 21:10:59, Samuele Kaplun ha scritto:
> Have you enabled HTTPS? There might be a further bug fix to back port...
> Cheers,
>       Sam

here it is:

commit ce280f87aba05d73bf706b4ce19fb0ab42a7f617
Author: Samuele Kaplun <samuele.kap...@cern.ch>
Date:   Tue Oct 30 16:30:25 2012 +0100

    WebStyle: req.is_https() fix

    * Fixes the implementation of SimulatedModPythonRequest.is_https()
      to use wsgi.url_scheme as per PEP333, rather than using
      wsgiref.util.guess_scheme().

diff --git a/modules/webstyle/lib/webinterface_handler_wsgi.py 
b/modules/webstyle/lib/webinterface_handler_wsgi.py
index 7437d04..7c221a0 100644
--- a/modules/webstyle/lib/webinterface_handler_wsgi.py
+++ b/modules/webstyle/lib/webinterface_handler_wsgi.py
@@ -25,7 +25,7 @@ import inspect
 from fnmatch import fnmatch

 from wsgiref.validate import validator
-from wsgiref.util import FileWrapper, guess_scheme
+from wsgiref.util import FileWrapper

 if __name__ != "__main__":
     # Chances are that we are inside mod_wsgi.
@@ -237,7 +237,7 @@ class SimulatedModPythonRequest(object):
             del self.__headers['content-length']

     def is_https(self):
-        return int(guess_scheme(self.__environ) == 'https')
+        return self.__environ.get('wsgi.url_scheme') == 'https'

     def get_method(self):
         return self.__environ['REQUEST_METHOD']

Cheers!
        Sam

P.s. but actually... if you are stick with 1.0.x, then what about
installing 1.0.3, rather than 1.0.2 which includes out of the box
this and many more bug fixes? ;-)
--
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>
INSPIRE Service Manager ** <http://inspirehep.net/>


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Reply via email to