Commit Graph

3 Commits

Author SHA1 Message Date
zhangbailin d3b26f3d93 Remove the redunant table from windows' editor
In windows env, cannot deal with '\t\t\t', maybe this is mistake
result in 'git pull' faild on windows env. In linux env show that(from
table):
[root@localhost manila]# vim releasenotes/notes/bug-1818081
bug-1818081-fix-inferred-script-name-in-case-of-proxy-urls-e33466af856708b4.yaml^I^I^I

Change-Id: I83a1fbeb8cc7f40e07017541283418da65f0fc36
2019-07-03 09:50:38 +08:00
Goutham Pacha Ravi 4b0c953f7f Fix API version inferred w/ un-versioned URLs
With [1], we fixed the issue with v1 API URLs when
configuring manila with a reverse proxy, like uwsgi.
However, the version discovery can be made against a
"unversioned" URL, i.e, the "/" endpoint.

Example version discovery target when there's no reverse
proxy:

   curl -i -X GET www.openstack-overcloud.com:8786/

Example version discovery target when manila is configured
with a web proxy:

   curl -i -X GET www.openstack-overcloud.com/shared-file-system/

Currently, the API assumes that a v2 endpoint is requested
and hence sets a default API version in the request, which
results in the wrong headers communicated to the client.

Fix this issue. The release note added with [1] should
suffice for this fix.

[1] I0363d7174f3d7ddefa8ced59b182faed665e9c36
Change-Id: I50d1024ee8485b8290c24fa850e60755b518fff3
Closes-Bug: #1818081
2019-03-13 17:42:07 -07:00
Goutham Pacha Ravi 0d8310ec7a Fix version selector when for proxy-style URLs
When manila API is served behind a proxy, the
"script_name" in the request can have the proxy
component in it. So, this patch fixes the version
selection logic by looking for the version in the
script name string instead of equivalence.

In addition, this patch adds some missing unit
tests and fixes tests that invoke a mocked
wsgi app for testing request context.

Change-Id: I0363d7174f3d7ddefa8ced59b182faed665e9c36
Partial-Bug: #1815038
Closes-Bug: #1818081
2019-03-11 16:42:25 +00:00