def is_form_post(environ):
    content_type = environ.get('CONTENT_TYPE', '').lower()
    if ';' in content_type:
        content_type = content_type.split(';', 1)[0]
    return content_type in ('application/x-www-form-urlencoded',
                            'multipart/form-data')
Determine whether the request is a POSTed html form
dataset/ETHPy150Open bbangert/routes/routes/middleware.py/is_form_post