[mod_python] CGI Environment Specs

Matt H matt at proweb.co.uk
Thu May 23 16:30:43 EST 2002


this works ->

def authenhandler(req):
        try :
                referer = req.headers_in['referer']
        except :
                referer = ""
        req.subprocess_env['HTTP_REFERER'] = referer.lower()

        pwd = req.get_basic_auth_pw()
        usr = req.connection.user

        if pwd=="bar" and usr=="f00" :
                return apache.OK
        return apache.HTTP_UNAUTHORIZED



More information about the Mod_python mailing list