Incorrect service URL in descriptions

Bug #1471614 reported by Mario Benito on 2015-07-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ladon
Undecided
Unassigned

Bug Description

When using HTTP_LADON_PROXY_PATH, the generated service urls are incorrect.

Here you have a new probe_client_path to deal with this:

def probe_client_path(environ):
        # Simplification of probe_client_path
        # Contributed by: George Marshall
        rtrn = request_uri(environ,include_query=0)
        if 'HTTP_LADON_PROXY_PATH' in environ:
                origen = rtrn.split('/')
                proxy_path = environ['HTTP_LADON_PROXY_PATH']
                proxy = proxy_path.split('/')
                try:
                        pos = origen.index(proxy[-1]) + 1
                except:
                        proxy_path = '/'.join(proxy[:-1])
                        pos = 3 # [http, '', server]
                if pos == len(origen):
                        return proxy_path
                return proxy_path + '/' + '/'.join(origen[pos:])
        return rtrn

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers