Comment 5 for bug 1419110

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to wsme (master)

Reviewed: https://review.openstack.org/154066
Committed: https://git.openstack.org/cgit/stackforge/wsme/commit/?id=8710dabb652dae775dee31789e91608f832e62e6
Submitter: Jenkins
Branch: master

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.

    Closes-Bug: 1419110
    Change-Id: I2b5c0075611490c047b27b1b43b0505fc5534b3b