salt_cherrypy with Python3 and complex CORS OPTION requests return HTTP 500 #55087
Labels
Bug
broken, incorrect, or confusing behavior
fixed-pls-verify
fix is linked, bug author to confirm fix
P4
Priority 4
Milestone
Description of Issue
I am trying to use salt_cherrypy from a browser application (uses complex CORS), but the OPTION requests return 500 error and the following exception from CherryPy:
ValueError: Page handlers MUST return bytes. Use tools.encode if you wish to return unicode
atsalt/netapi/rest_cherrypy/app.py:824
(see below for full traceback).A related issue on CherryPy might be cherrypy/cherrypy#1123
Setup
Relevant master config (SSL from letsencrypt):
Steps to Reproduce Issue
Running (JavaScript, browser fetch API):
Results in HTTP 500 on the OPTION request on the browser + the following log from salt-api:
Workaround
I manually modified
salt/netapi/rest_cherrypy/app.py:824
into:And the error was fixed.
Can this be fixed on master or should I come with a pull request (it's a pretty trivial change)?
Versions Report
Thanks.
The text was updated successfully, but these errors were encountered: