uWSGI Returning Empty Response

Solution 1:

I had the some problem, it turned out that my wsgi application was returning UNICODE instead of BYTE STRINGS (I was on python3) ; and nothing showed in logs about it... WSGI expects byte strings in output, never unicode.

In the callable of your application instead of return "string" you should use return b"string" or return "string".encode("utf-8")

def application(env, start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])
    # One of the below can be used.
    return "string".encode("utf-8")
    return b"string"

You can check http://uwsgi-docs.readthedocs.io/en/latest/Python.html#python-3 out for more informaiton on using uwsgi with python3.