Murano incorrectly uses 415 instead of 406 when requested an incorrect Accept header

Bug #1512390 reported by Kirill Zaitsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Konstantin
Liberty
Won't Fix
High
Kirill Zaitsev

Bug Description

Murano currently uses 415 where 406 is applicable.

415 means that server is unable to parse requests content_type
406 mean that server is unable to serve the response in the content_type, requested by accept header

This was brought to light by a webob1.5.1 that fixed usage of 415 exception.

This happens in best_match_content_type that determines requested response content-type based on Accept header.

Changed in murano:
assignee: nobody → Kirill Zaitsev (kzaitsev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

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

Changed in murano:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/240926

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

Reviewed: https://review.openstack.org/240902
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=fe15769b277bb2a7107de4317057537a9b322fae
Submitter: Jenkins
Branch: master

commit fe15769b277bb2a7107de4317057537a9b322fae
Author: Kirill Zaitsev <email address hidden>
Date: Mon Nov 2 18:25:53 2015 +0300

    Use detail instead of explanation for 415 errors

    As of webob 1.5.1 415 exception does not have explanation in it's
    template. 'detail' is present in both versions templates.
    Also adds CONTENT_TYPE to test-requests environment, to allow tests to
    run correctly.

    Change-Id: I52f2686ee838eef38ea9c5f48fe5f9e093e82412
    Partial-Bug: #1512390

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (stable/liberty)

Reviewed: https://review.openstack.org/240926
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=577c5508218de24094ac1d6ab2189b9cac4b086b
Submitter: Jenkins
Branch: stable/liberty

commit 577c5508218de24094ac1d6ab2189b9cac4b086b
Author: Kirill Zaitsev <email address hidden>
Date: Mon Nov 2 18:25:53 2015 +0300

    Use detail instead of explanation for 415 errors

    As of webob 1.5.1 415 exception does not have explanation in it's
    template. 'detail' is present in both versions templates.
    Also adds CONTENT_TYPE to test-requests environment, to allow tests to
    run correctly.

    Change-Id: I52f2686ee838eef38ea9c5f48fe5f9e093e82412
    Partial-Bug: #1512390

tags: added: in-stable-liberty
Changed in murano:
assignee: Kirill Zaitsev (kzaitsev) → nobody
status: In Progress → Confirmed
tags: added: low-hanging-fruit
Changed in murano:
assignee: nobody → Jaiveek Shah (jaiveek-shah)
assignee: Jaiveek Shah (jaiveek-shah) → nobody
Changed in murano:
assignee: nobody → Rohini Choudhary (enthurohini)
Stan Lagun (slagun)
Changed in murano:
status: Confirmed → Fix Committed
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote : Re: Murano incorrectly uses 415 instead of 406

Only a partial fix was merged, that unlocked the gate

Changed in murano:
status: Fix Committed → Confirmed
Changed in murano:
milestone: mitaka-1 → mitaka-2
Changed in murano:
assignee: Rohini Choudhary (enthurohini) → nobody
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

The gate part of this bug was fixed and the gate is no longer blocked

tags: removed: gate
Changed in murano:
milestone: mitaka-2 → mitaka-3
Konstantin (ksnihyr)
Changed in murano:
assignee: nobody → Konstantin (ksnihyr)
summary: - Murano incorrectly uses 415 instead of 406
+ Murano incorrectly uses 415 instead of 406 when requested an incorrect
+ Accept header
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

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

Changed in murano:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/277817
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=d663171fe33edb2b70e1603ce1810698819d8ba6
Submitter: Jenkins
Branch: master

commit d663171fe33edb2b70e1603ce1810698819d8ba6
Author: Konstantin Snihyr <email address hidden>
Date: Tue Feb 9 16:01:13 2016 +0300

    Replace HTTP 415 return code to HTTP 406 when it's correct

    Server must return HTTP 406 code when content type,
    specified in "Accept" header unexpected or unknown
    Otherwise server must return HTTP 415 code.
    For example, if content type parsed from "Content-Type"

    Change-Id: Ic85d1ad9e44ae722dca347b9f1dd643ba3490062
    Closes-Bug: #1512390

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

This issue was fixed in the openstack/murano 2.0.0.0b3 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.