def extract_data(env):
    """Extracts the data from the envment of a POST request."""
    try:
        length = int(env.get('CONTENT_LENGTH', '0'))
    except ValueError:
        length = 0
    if length != 0:
        return env['wsgi.input'].read(length)
    return ""