What does a wsgi server consist of?
my 2c, is that getting something working is pretty easy, it's just that HTTP is such an old/complex standard it takes a lot of work to get all the edge cases working nicely

how well does it tolerate errors in the WSGI client code
HTTP 0.9, 1.0, 1.1 or 2/SPDY?
how do you handle malicious clients that send a byte every 10 seconds
the various Keep-Alive and Tranfer-Encoding variants seems to end up consuming a lot of code
does it do Content-Encoding as well
I'm reading on the WSGI specification, and tried implementing a simple WSGI server from scratch, and tested it on a simple flask application. Currently it

opens a socket listener
passes each incoming connection to another thread to handle it
the handler parses the request, creates the environ, passes it to the flask app object, and returns the response.

Overall, it seems to work. Conceptually, what more does a real server, eg. gunicorn do? I'm asking in terms of the basic functionality, not in terms of supporting more features (eg. different protocols). What makes a server better, eg. why is gunicorn suitable for production, but wsgiref is not?