Comment 2 for bug 1987418

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

Reviewed: https://review.opendev.org/c/openstack/mistral/+/854240
Committed: https://opendev.org/openstack/mistral/commit/2a312cc81446c9e3ac98e6bc698fb44a82cba2b0
Submitter: "Zuul (22348)"
Branch: master

commit 2a312cc81446c9e3ac98e6bc698fb44a82cba2b0
Author: Arnaud Morin <email address hidden>
Date: Tue Aug 23 18:11:39 2022 +0200

    Do not guess content from extension on API

    When getting a cron trigger (but also any other object) by name, pecan
    core will try to guess the content_type from the extension.
    While for most name, the guess will fail, it may succeed, e.g. when a
    name is ending with '.pl'.
    Pecan guess it as a perl file and then reject the call (with a 404
    error).

    The fix is to tell pecan to not guess any content_type from extension by
    setting guess_content_type_from_ext to False on initialisation.

    Closes-Bug: 1987418

    Signed-off-by: Arnaud Morin <email address hidden>
    Change-Id: I1bc20b953787cae9b42d12bb5eb3c7a94ed4bbdd