Since the introduction of quoting of header content in https://review.openstack.org/568698, the 'x-image-meta-location' header
has been broken, because urllib.quote() is really intended to be applied
to only the path section of a URL, but in this case, it gets applied to
the entire URL, and catches the colon that separates the scheme from the
remainder of the URL.
This change adds the colon to the list of characters that should not get
quoted. Since a colon can be directly represented in ASCII, this should
not invalidate the previous change.
Change-Id: I76a1c9a361b6c9f6eb95ae766b8c3bcf2267703a
Closes-Bug: #1788942
(cherry picked from commit 1156346dc243dc46bcc7c78a64454ff4bae7ddc5)
Reviewed: https:/ /review. openstack. org/618362 /git.openstack. org/cgit/ openstack/ python- glanceclient/ commit/ ?id=e0673a17fd6 84ca29ae6674f2d f6303f99c79bce
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit e0673a17fd684ca 29ae6674f2df630 3f99c79bce
Author: imacdonn <email address hidden>
Date: Thu Nov 1 21:36:11 2018 +0000
Don't quote colon in HTTP headers
Since the introduction of quoting of header content in /review. openstack. org/568698, the 'x-image- meta-location' header
https:/
has been broken, because urllib.quote() is really intended to be applied
to only the path section of a URL, but in this case, it gets applied to
the entire URL, and catches the colon that separates the scheme from the
remainder of the URL.
This change adds the colon to the list of characters that should not get
quoted. Since a colon can be directly represented in ASCII, this should
not invalidate the previous change.
Change-Id: I76a1c9a361b6c9 f6eb95ae766b8c3 bcf2267703a 6bcc7c78a64454f f4bae7ddc5)
Closes-Bug: #1788942
(cherry picked from commit 1156346dc243dc4