Update server tag return plain text in response body instead of empty content

Bug #1602044 reported by Ghanshyam Mann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Ghanshyam Mann

Bug Description

update server tag API (PUT /servers/{server_id}/tags/{tag}) return the 201 and 204 success code if tag is created or already exist respectively.

But in former case, API return response body with plain text-

'{"code": "201 Created", "message": "<br /><br />\\n\\n\\n", "title": "Created"}'

This is because it use webob.exc to generate 201. This kind of response body will break while parsing the data for content type. Also this is consistent with other nova API.

webob.Response is the right choice to generate 201 without content.

Changed in nova:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/340629

Changed in nova:
status: New → In Progress
summary: Update server tag return plain text in response body instead of empty
+ content
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/340629
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b644a0de07ccbaa2561739831ebb0f9c0d929512
Submitter: Jenkins
Branch: master

commit b644a0de07ccbaa2561739831ebb0f9c0d929512
Author: ghanshyam <email address hidden>
Date: Tue Jul 12 09:50:40 2016 +0900

    Fix PUT server tag 201 to return empty content

    Update server tag API (PUT /servers/{server_id}/tags/{tag})
    return the 201 and 204 success code if tag is created or
    already exist respectively.

    But in former case, API return response body with plain text-

    '{"code": "201 Created", "message": "<br /><br />\\n\\n\\n", "title": "Created"}'

    This is because it use webob.exc to generate 201. This kind
    of response body may break parsing of the data for content type.
    Also this is consistent with other nova API.

    webob.Response is the right choice to generate 201 without content.

    Change-Id: Ib0958a7a99d866a38485715b5b613914e60ad425
    Closes-Bug: #1602044

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 14.0.0.0b2

This issue was fixed in the openstack/nova 14.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.