repoze/repoze.who — pull request #8 by daghoidahl (2013-02-15 14:20:05+00:00)
Title: Handling of missing content-type headers breaks POST

When receiving an empty HTTP POST request from Apache using mod_wsgi or proxy_mod_wsgi, there is no CONTENT_TYPE item in the environ dict.

As far as I can gather, content-type is not a required header for POST requests. So, if I'm not mistaken, repoze/who/_compat.py should handle that condition without throwing an exception.

So, here is my proposed solution. If I am mistaken, though, I'd be happy for some guidance as to how this situation should be handled.