Root document contains incorrect href with 0.0.0.0
Bug #915621 reported by
Pete Zaitcev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Medium
|
Pete Zaitcev |
Bug Description
If the default configuration is used, with bind_host=0.0.0.0, the root document looks like this:
{"versions": [{"status": "CURRENT", "id": "v1.1", "links": [{"href": "http://
These href values cannot be used by a remote client.
The correct way to reconstruct remote URLs require using the HTTP request header Host: for HTTP 1.1 clients, or the connect address for HTTP 1.0 clients. The bind address should not be used.
Note that using bind address is also incompatible with IPv6.
Please see proposed patch at
https:/
Changed in glance: | |
assignee: | nobody → Pete Zaitcev (zaitcev) |
status: | New → In Progress |
Changed in glance: | |
importance: | Undecided → Medium |
milestone: | none → essex-3 |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | essex-3 → 2012.1 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/2988 github. com/openstack/ glance/ commit/ b46401a17b68dee 4568e7ff01a5534 a62eb9285f
Committed: http://
Submitter: Jenkins
Branch: master
commit b46401a17b68dee 4568e7ff01a5534 a62eb9285f
Author: Pete Zaitcev <email address hidden>
Date: Wed Jan 11 21:24:22 2012 -0700
Return correct href if bind_host is 0.0.0.0.
The existing code returns incorrect href= in the root document (aka
"version" document) if the default configuration is used. If a remote
system accesses Glance API, the netspec of href= contains 0.0.0.0,
which cannot be used for further remote accesses. This happens because
attempts to use local configuration or the bind address to reconstruct
URLs are futile.
The correct way resolve this problem is to use the Host: header
of the HTTP request. As a bonus, it works with IPv6, should we ever
support it.
Change-Id: I661351b679c695 bd6ab310104a324 6dd3069f9c6
Bug: 915621