barbican/barbican
Stefan Nica 27cf2f37f6 Fix duplicate paths in secret hrefs
Reconstructing the base URL from a request when
host_href is not set must take into account that
an URL path may consist of and endpoint part followed
by a resource path, e.g.:

'http://localhost/key-manager/v1/secrets/25a24d6b-605e-4226-ab39-7e2d8e10f559'

where the endpoint URL is `http://localhost/key-manager/v1`

The pecan.request.application_url is used instead of
pecan.request.url to retrieve the base URL part
(`http://localhost/key-manager/v1`) excluding the resource
path. However, the /v1 version particle is included into the
application_url value because it is implemented by a wsgi
application rather than a pecan controller, so the /v1 bit
also needs to be removed from the base URL when present.

Change-Id: I3c05f3d2f9a970213ca8347d7bbe1aac203af0a1
Closes-Bug: #1749217
(cherry picked from commit ff55d17034)
2019-08-22 13:59:49 +00:00
..
api Fix response status for invalid routes 2018-07-24 11:59:13 -05:00
cmd Refactor PKCS#11 to allow configurable mechanisms 2018-08-10 22:24:34 -05:00
common Fix duplicate paths in secret hrefs 2019-08-22 13:59:49 +00:00
hacking Remove log translation related check 2017-03-30 09:25:20 +08:00
locale Imported Translations from Zanata 2018-06-03 06:16:58 +00:00
model Initial the unit-tests of OVO for Barbican 2018-07-15 10:39:12 +07:00
objects Implement the "check_exc" parameter for OVO 2018-07-15 10:39:12 +07:00
plugin Fix the bug of pep8 and building api-guide 2019-08-07 22:39:02 +00:00
queue Update the periodic_task link for retry_scheduler 2018-07-05 13:32:56 -04:00
tasks Remove translation of log messages 2017-06-03 10:18:55 +07:00
tests Fix duplicate paths in secret hrefs 2019-08-22 13:59:49 +00:00
__init__.py Files with no code must be left completely empty 2016-11-17 14:19:47 +08:00
context.py Enforce usage of oslo.context's project_id 2018-04-23 17:37:52 +03:00
i18n.py Remove translation logging prefixes from i18n 2017-06-08 03:13:19 +00:00
version.py Enable tag-based full version reporting via pbr 2014-01-22 18:01:30 -06:00