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.
Reviewed: https:/ /review. opendev. org/c/openstack /mistral/ +/854240 /opendev. org/openstack/ mistral/ commit/ 2a312cc81446c9e 3ac98e6bc698fb4 4a82cba2b0
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 2a312cc81446c9e 3ac98e6bc698fb4 4a82cba2b0
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 type_from_ ext to False on initialisation.
setting guess_content_
Closes-Bug: 1987418
Signed-off-by: Arnaud Morin <email address hidden> e9b42d12bb5eb3c 7a94ed4bbdd
Change-Id: I1bc20b953787ca