commit 8710dabb652dae775dee31789e91608f832e62e6
Author: Chris Dent <email address hidden>
Date: Mon Feb 9 14:52:07 2015 +0000
Improve Accept and Content-Type handling
Originally, if WSME received an Accept or Content-Type header that
was not aligned with what it was prepared to handle it would error
out with a 500 status code. This is not good behavior for a web
service.
In the process of trying to fix this it was discovered that the
content-negotiation code within WSME (the code that, in part,
looks for a suitable protocol handler for a request) and tests of
that code are incorrect, violating expected HTTP behaviors. GET
requests are passing Content-Type headers to declare the desired
type of representation in the response. This is what Accept is for.
Unfortunately the server-side code was perfectly willing to accept
this behavior. These changes correct that.
Reviewed: https:/ /review. openstack. org/154066 /git.openstack. org/cgit/ stackforge/ wsme/commit/ ?id=8710dabb652 dae775dee31789e 91608f832e62e6
Committed: https:/
Submitter: Jenkins
Branch: master
commit 8710dabb652dae7 75dee31789e9160 8f832e62e6
Author: Chris Dent <email address hidden>
Date: Mon Feb 9 14:52:07 2015 +0000
Improve Accept and Content-Type handling
Originally, if WSME received an Accept or Content-Type header that
was not aligned with what it was prepared to handle it would error
out with a 500 status code. This is not good behavior for a web
service.
In the process of trying to fix this it was discovered that the negotiation code within WSME (the code that, in part,
content-
looks for a suitable protocol handler for a request) and tests of
that code are incorrect, violating expected HTTP behaviors. GET
requests are passing Content-Type headers to declare the desired
type of representation in the response. This is what Accept is for.
Unfortunately the server-side code was perfectly willing to accept
this behavior. These changes correct that.
Closes-Bug: 1419110 c047b27b1b43b05 05fc5534b3b
Change-Id: I2b5c0075611490