wsgi plugins: mod_wsgi expects bytes as an output

python3-mod_wsgi expects that the application() method returns
bytes otherwise it breaks.

https://pagure.io/freeipa/issue/4985

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Stanislav Laznicka
2017-06-27 16:48:21 +02:00
committed by Martin Basti
parent 1a35a2e213
commit db4d0998fd
3 changed files with 8 additions and 6 deletions
+4 -2
View File
@@ -34,10 +34,12 @@ def get_plugin_index():
index = 'define([],function(){return['
index += ','.join("'"+x+"'" for x in dirs)
index += '];});'
return index
return index.encode('utf-8')
def get_failed():
return 'define([],function(){return[];});/*error occured: serving default */'
return (
b'define([],function(){return[];});/*error occured: serving default */'
)
def application(environ, start_response):
try: