webob 1.8.x has altered its processing for accept-* headers [1],
including being less accomodating of less than well-formed qvalues.
If it is unable to parse a header, rather than raising an error of
anything like that, a special class of header is created instead.
This header still responds on all the same methods as before, but with
different results. In the big picture this is a good thing (for
correcting processing for content-negotiation) but it is a bit weird
for us.
This change fixes the immediate short term problem, broken unit tests,
by fixing their bad qvalues. The new values will continue to work with
old webob. We can hope/assume that most clients will send well-formed
qvalues.
Longer term we will need to address how the nova Request object is
choosing to do best match handling on accept headers to address that
webob has deprecated (with a long warning period) methods used by the
object.
Reviewed: https:/ /review. openstack. org/564255 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=5b00f19109b 5f4d2ae229f7e8d 79a4c5f0a66492
Committed: https:/
Submitter: Zuul
Branch: master
commit 5b00f19109b5f4d 2ae229f7e8d79a4 c5f0a66492
Author: Chris Dent <email address hidden>
Date: Wed Apr 25 16:26:53 2018 +0100
Make accept-language tests work with webob 1.8.x
webob 1.8.x has altered its processing for accept-* headers [1], negotiation) but it is a bit weird
including being less accomodating of less than well-formed qvalues.
If it is unable to parse a header, rather than raising an error of
anything like that, a special class of header is created instead.
This header still responds on all the same methods as before, but with
different results. In the big picture this is a good thing (for
correcting processing for content-
for us.
This change fixes the immediate short term problem, broken unit tests,
by fixing their bad qvalues. The new values will continue to work with
old webob. We can hope/assume that most clients will send well-formed
qvalues.
Longer term we will need to address how the nova Request object is
choosing to do best match handling on accept headers to address that
webob has deprecated (with a long warning period) methods used by the
object.
Partial-Bug: #1765748
[1] https:/ /docs.pylonspro ject.org/ projects/ webob/en/ stable/ whatsnew- 1.8.html# backwards- incompatibiliti es
Change-Id: I2034d30cc8d935 4be80d39e05b848 8cb99c32ecf